package io.ebean.meta;
import java.util.ArrayList;
import java.util.List;
public class BasicMetricVisitor extends AbstractMetricVisitor {
private final List<MetaTimedMetric> timed = new ArrayList<>();
private final List<MetaQueryMetric> dtoQuery = new ArrayList<>();
private final List<MetaOrmQueryMetric> ormQuery = new ArrayList<>();
public BasicMetricVisitor() {
super(true, true, true);
}
public BasicMetricVisitor(boolean reset, boolean collectTransactionMetrics, boolean collectQueryMetrics) {
super(reset, collectTransactionMetrics, collectQueryMetrics);
}
public List<MetaTimedMetric> getTimedMetrics() {
return timed;
}
public List<MetaQueryMetric> getDtoQueryMetrics() {
return dtoQuery;
}
public List<MetaOrmQueryMetric> getOrmQueryMetrics() {
return ormQuery;
}
@Override
public void visitTimed(MetaTimedMetric metric) {
timed.add(metric);
}
@Override
public void visitQuery(MetaQueryMetric metric) {
dtoQuery.add(metric);
}
@Override
public void visitOrmQuery(MetaOrmQueryMetric metric) {
ormQuery.add(metric);
}
}