Class DefaultProfileHandler

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

public final class DefaultProfileHandler extends Object implements SpiProfileHandler, 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(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(ProfileLocation location)
      Create and return a ProfileStream.
      Specified by:
      createProfileStream in interface SpiProfileHandler
      Parameters:
      location - The profile location
    • configure

      public void configure(SpiServer server)
      Specified by:
      configure in interface Plugin
    • online

      public void online(boolean online)
      Specified by:
      online in interface Plugin
    • shutdown

      public void shutdown()
      Specified by:
      shutdown in interface Plugin