Package co.elastic.apm.agent.bci
Class MatcherTimerLifecycleListener
- java.lang.Object
-
- co.elastic.apm.agent.context.AbstractLifecycleListener
-
- co.elastic.apm.agent.bci.MatcherTimerLifecycleListener
-
- All Implemented Interfaces:
LifecycleListener
public class MatcherTimerLifecycleListener extends AbstractLifecycleListener
-
-
Constructor Summary
Constructors Constructor Description MatcherTimerLifecycleListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidstop()Callback for whenElasticApmTracer.stop()has been called.-
Methods inherited from class co.elastic.apm.agent.context.AbstractLifecycleListener
init, pause, resume, start
-
-
-
-
Method Detail
-
stop
public void stop()
Description copied from interface:LifecycleListenerCallback for whenElasticApmTracer.stop()has been called.Typically, this method is used to clean up resources like thread pools so that there are no class loader leaks when a webapp is redeployed in an application server.
Exceptions thrown from this method are caught and handled so that they don't prevent further cleanup actions.
The order of the shutdown process is as follows:
-
The
LifecycleListener.stop()method of all lifecycle listeners is called. The order in which lifecycle listeners are called is non-deterministic. -
The
ElasticApmTracer.getSharedSingleThreadedPool()is shut down gracefully, waiting a moment for the already scheduled tasks to be completed. This means that implementations of this method can schedule a last command to this pool that is executed before shutdown. TheTracer.getState()will still beTracer.TracerState.RUNNINGin the tasks scheduled toElasticApmTracer.getSharedSingleThreadedPool()within this method. -
The tracer state is set to
Tracer.TracerState.STOPPED. -
The
Reporteris closed.
- Specified by:
stopin interfaceLifecycleListener- Overrides:
stopin classAbstractLifecycleListener
-
The
-
-