Package io.ebean.meta
Class BasicMetricVisitor
- java.lang.Object
-
- io.ebean.meta.AbstractMetricVisitor
-
- io.ebean.meta.BasicMetricVisitor
-
- All Implemented Interfaces:
MetricVisitor
,ServerMetrics
public class BasicMetricVisitor extends AbstractMetricVisitor implements ServerMetrics
A simple MetricVisitor that can collect the desired metrics into lists.
-
-
Constructor Summary
Constructors Constructor Description BasicMetricVisitor()
Construct to reset and collect everything.BasicMetricVisitor(boolean reset, boolean collectTransactionMetrics, boolean collectQueryMetrics, boolean collectL2Metrics)
Construct specifying reset and what to collect.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<MetaCountMetric>
getCountMetrics()
Return the Counter metrics.List<MetaQueryMetric>
getQueryMetrics()
Return the query metrics.List<MetaTimedMetric>
getTimedMetrics()
Return timed metrics for Transactions, labelled SqlQuery, labelled SqlUpdate.void
visitCount(MetaCountMetric metric)
Visit a Counter metric.void
visitQuery(MetaQueryMetric metric)
Visit DTO and SQL query metrics.void
visitTimed(MetaTimedMetric metric)
Visit transaction metrics (and L2 cache metrics in future).-
Methods inherited from class io.ebean.meta.AbstractMetricVisitor
isCollectL2Metrics, isCollectQueryMetrics, isCollectTransactionMetrics, isReset, visitEnd, visitStart
-
-
-
-
Constructor Detail
-
BasicMetricVisitor
public BasicMetricVisitor()
Construct to reset and collect everything.
-
BasicMetricVisitor
public BasicMetricVisitor(boolean reset, boolean collectTransactionMetrics, boolean collectQueryMetrics, boolean collectL2Metrics)
Construct specifying reset and what to collect.
-
-
Method Detail
-
getTimedMetrics
public List<MetaTimedMetric> getTimedMetrics()
Description copied from interface:ServerMetrics
Return timed metrics for Transactions, labelled SqlQuery, labelled SqlUpdate.- Specified by:
getTimedMetrics
in interfaceServerMetrics
-
getQueryMetrics
public List<MetaQueryMetric> getQueryMetrics()
Description copied from interface:ServerMetrics
Return the query metrics.- Specified by:
getQueryMetrics
in interfaceServerMetrics
-
getCountMetrics
public List<MetaCountMetric> getCountMetrics()
Description copied from interface:ServerMetrics
Return the Counter metrics.- Specified by:
getCountMetrics
in interfaceServerMetrics
-
visitTimed
public void visitTimed(MetaTimedMetric metric)
Description copied from interface:MetricVisitor
Visit transaction metrics (and L2 cache metrics in future).- Specified by:
visitTimed
in interfaceMetricVisitor
-
visitQuery
public void visitQuery(MetaQueryMetric metric)
Description copied from interface:MetricVisitor
Visit DTO and SQL query metrics.- Specified by:
visitQuery
in interfaceMetricVisitor
-
visitCount
public void visitCount(MetaCountMetric metric)
Description copied from interface:MetricVisitor
Visit a Counter metric.- Specified by:
visitCount
in interfaceMetricVisitor
-
-