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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcollectTransactionProfile(TransactionProfile transactionProfile) Low contention adding the transaction profile to the queue.voidconfigure(io.ebean.plugin.SpiServer server) createProfileStream(io.ebean.ProfileLocation location) Create and return a ProfileStream.voidonline(boolean online) voidshutdown()
-
Constructor Details
-
DefaultProfileHandler
public DefaultProfileHandler(io.ebean.config.ProfilingConfig config)
-
-
Method Details
-
collectTransactionProfile
Low contention adding the transaction profile to the queue. Minimise the impact to the normal transaction processing (threads).- Specified by:
collectTransactionProfilein interfaceSpiProfileHandler- Parameters:
transactionProfile- The transaction profile that has just been collected
-
createProfileStream
Create and return a ProfileStream.- Specified by:
createProfileStreamin interfaceSpiProfileHandler- Parameters:
location- The profile location
-
configure
public void configure(io.ebean.plugin.SpiServer server) - Specified by:
configurein interfaceio.ebean.plugin.Plugin
-
online
public void online(boolean online) - Specified by:
onlinein interfaceio.ebean.plugin.Plugin
-
shutdown
public void shutdown()- Specified by:
shutdownin interfaceio.ebean.plugin.Plugin
-