Interface AutoTuneService

All Superinterfaces:
AutoTune
All Known Implementing Classes:
NoAutoTuneService

public interface AutoTuneService extends AutoTune
Collects and manages the the profile information.

The profile information is periodically converted into "tuned query details" - which is used to automatically tune the queries that use AutoTune.

The "tuned query details" effectively are part of the query that has the select() and join() information (but not the where clause, order by, limits etc). These are applied to the query when tuneQuery() is called.

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Fire a garbage collection (hint to the JVM).
    void
    On shutdown fire garbage collection and collect statistics.
    void
    Load the query tuning information.
    boolean
    tuneQuery(SpiQuery<?> query)
    Called when a query thinks it should be automatically tuned by AutoTune.

    Methods inherited from interface io.ebean.AutoTune

    reportProfiling
  • Method Details

    • startup

      void startup()
      Load the query tuning information.
    • tuneQuery

      boolean tuneQuery(SpiQuery<?> query)
      Called when a query thinks it should be automatically tuned by AutoTune.

      Returns true if the query was tuned.

    • collectProfiling

      void collectProfiling()
      Fire a garbage collection (hint to the JVM). Assuming garbage collection fires this will gather the usage profiling information.
      Specified by:
      collectProfiling in interface AutoTune
    • shutdown

      void shutdown()
      On shutdown fire garbage collection and collect statistics. Note that usually we add a little delay (100 milliseconds) to give the garbage collector plenty of time to do its thing and collect the profile information.