Interface ContextTimer

  • All Known Implementing Classes:
    MetricsContextTimer, MicrometerContextTimer, OpentracingContextTimer

    public interface ContextTimer
    Minimal Service Provider Interface for services that wish to get informed of context switching metrics.

    Currently the following timed operations are updated:

    • ContextManagers.createContextSnapshot
    • ContextSnapshot.reactivate
    • ContextManager.initializeNewContext(*)
    • ContextManager.getActiveContext(*)

    (*) Timing is updated for each concrete ContextManager implementation class

    Author:
    Sjoerd Talsma
    • Method Detail

      • update

        void update​(Class<?> type,
                    String method,
                    long duration,
                    TimeUnit unit)
        Provides a new update for the context timer.
        Parameters:
        type - The class being called
        method - The method being called
        duration - The duration of the method
        unit - The unit of the duration