io.ebeaninternal.metric.TimedMetric Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ebean Show documentation
Show all versions of ebean Show documentation
composite of common runtime dependencies for all platforms
package io.ebeaninternal.metric;
import io.ebean.meta.MetricVisitor;
/**
* Metric for timed events like transaction execution times.
*/
public interface TimedMetric {
/**
* Add a time event (usually in microseconds).
*/
void add(long micros);
/**
* Add a time event with the number of loaded beans or rows.
*/
void add(long micros, long beans);
/**
* Return true if there are no metrics collected since the last collection.
*/
boolean isEmpty();
/**
* Reset the statistics.
*/
void reset();
/**
* Collect and return a snapshot of the metrics.
*/
TimedMetricStats collect(boolean reset);
/**
* Visit non empty metrics.
*/
void visit(MetricVisitor visitor);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy