All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.ebeaninternal.server.dto.DtoQueryPlanBase Maven / Gradle / Ivy

There is a newer version: 15.8.0
Show newest version
package io.ebeaninternal.server.dto;

import io.ebean.meta.MetricVisitor;
import io.ebean.metric.QueryPlanMetric;
import io.ebean.metric.TimedMetric;

abstract class DtoQueryPlanBase implements DtoQueryPlan {

  private final QueryPlanMetric planMetric;

  private final TimedMetric metric;

  DtoQueryPlanBase(DtoMappingRequest request) {
    this.planMetric = request.createMetric();
    this.metric = planMetric.metric();
  }

  @Override
  public void collect(long exeTime) {
    metric.add(exeTime);
  }

  @Override
  public void visit(MetricVisitor visitor) {
    planMetric.visit(visitor);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy