Class DefaultProfileHandler

java.lang.Object
io.ebeaninternal.server.transaction.DefaultProfileHandler
All Implemented Interfaces:
io.ebean.plugin.Plugin, SpiProfileHandler

public final class DefaultProfileHandler extends Object implements SpiProfileHandler, io.ebean.plugin.Plugin
Default profile handler.

Uses ConcurrentLinkedQueue to minimise contention on threads calling collectTransactionProfile().

Uses a sleep backoff on the single threaded consumer that reads the profiles and writes them to files.

  • Constructor Details

    • DefaultProfileHandler

      public DefaultProfileHandler(io.ebean.config.ProfilingConfig config)
  • Method Details

    • collectTransactionProfile

      public void collectTransactionProfile(TransactionProfile transactionProfile)
      Low contention adding the transaction profile to the queue. Minimise the impact to the normal transaction processing (threads).
      Specified by:
      collectTransactionProfile in interface SpiProfileHandler
      Parameters:
      transactionProfile - The transaction profile that has just been collected
    • createProfileStream

      public ProfileStream createProfileStream(io.ebean.ProfileLocation location)
      Create and return a ProfileStream.
      Specified by:
      createProfileStream in interface SpiProfileHandler
      Parameters:
      location - The profile location
    • configure

      public void configure(io.ebean.plugin.SpiServer server)
      Specified by:
      configure in interface io.ebean.plugin.Plugin
    • online

      public void online(boolean online)
      Specified by:
      online in interface io.ebean.plugin.Plugin
    • shutdown

      public void shutdown()
      Specified by:
      shutdown in interface io.ebean.plugin.Plugin