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

io.ebeaninternal.api.SpiQueryBindCapture Maven / Gradle / Ivy

There is a newer version: 15.8.1
Show newest version
package io.ebeaninternal.api;

import io.ebeaninternal.server.bind.capture.BindCapture;

/**
 * Capture query bind values and with those actual database query plans.
 */
public interface SpiQueryBindCapture {

  /**
   * 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).
   */
  boolean collectFor(long timeMicros);

  /**
   * 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.
   */
  void queryPlanInit(long thresholdMicros);
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy