001package io.ebean.metric;
002
003import io.ebean.meta.MetaQueryMetric;
004
005import java.util.List;
006
007/**
008 * Object used to collect query plan metrics.
009 */
010public interface QueryPlanCollector {
011
012  /**
013   * Return true if the statistics should be reset.
014   */
015  boolean isReset();
016
017  /**
018   * Add the query plan statistic.
019   */
020  void add(MetaQueryMetric stats);
021
022  /**
023   * Return all the collected query plan statistics.
024   */
025  List<MetaQueryMetric> complete();
026}