package io.ebeaninternal.api;

import io.ebean.meta.QueryPlanRequest;
import io.ebeaninternal.server.type.bindcapture.BindCapture;

Capture query bind values and with those actual database query plans.
/** * Capture query bind values and with those actual database query plans. */
public interface SpiQueryBindCapture {
NOOP implementation.
/** * NOOP implementation. */
SpiQueryBindCapture NOOP = new NoopQueryBindCapture();
Return true if the query just executed should be bind captured to collect the query plan from (as the query time is large / interesting).
/** * Return true if the query just executed should be bind captured to collect * the query plan from (as the query time is large / interesting). */
boolean collectFor(long timeMicros);
Set the captured bind values that we can use later to collect a query plan.
Params:
  • bindCapture – The bind values of the query
  • queryTimeMicros – The query execution time
  • startNanos – The nanos start of this bind capture
/** * Set the captured bind values that we can use later to collect a query plan. * * @param bindCapture The bind values of the query * @param queryTimeMicros The query execution time * @param startNanos The nanos start of this bind capture */
void setBind(BindCapture bindCapture, long queryTimeMicros, long startNanos);
Update the threshold micros triggering the bind capture.
/** * Update the threshold micros triggering the bind capture. */
void queryPlanInit(long thresholdMicros); }