Refactor for query plan capture with initial threshold micros

This commit is contained in:
rob bygrave
2019-12-23 10:28:08 +13:00
parent 71295077a5
commit 6fcac27dfe
25 changed files with 388 additions and 114 deletions
@@ -0,0 +1,22 @@
package io.ebeaninternal.server.query;
import io.ebeaninternal.api.QueryPlanManager;
import io.ebeaninternal.api.SpiQueryBindCapture;
import io.ebeaninternal.api.SpiQueryPlan;
public class CQueryPlanManager implements QueryPlanManager {
private final long threshold;
private final QueryPlanLogger planLogger;
public CQueryPlanManager(long threshold, QueryPlanLogger planLogger) {
this.threshold = threshold;
this.planLogger = planLogger;
}
@Override
public SpiQueryBindCapture createBindCapture(SpiQueryPlan queryPlan) {
return new CQueryBindCapture(queryPlan, planLogger, threshold);
}
}