Class AsyncOperationEndStrategies

java.lang.Object
io.opentelemetry.instrumentation.api.annotation.support.async.AsyncOperationEndStrategies

public abstract class AsyncOperationEndStrategies extends Object
A global registry of AsyncOperationEndStrategy implementations.
  • Constructor Details

    • AsyncOperationEndStrategies

      public AsyncOperationEndStrategies()
  • Method Details

    • internalSetStrategiesStorage

      public static void internalSetStrategiesStorage(AsyncOperationEndStrategies strategies)
      Sets the actual strategies' registry implementation. The javaagent uses weak references to make unloading strategy classes possible.

      This is supposed to be only called by the javaagent. Instrumentation must not call this.

    • instance

      public static AsyncOperationEndStrategies instance()
      Obtain instance of the async strategy registry.
    • registerStrategy

      public abstract void registerStrategy(AsyncOperationEndStrategy strategy)
      Add the passed strategy to the registry.
    • unregisterStrategy

      public abstract void unregisterStrategy(AsyncOperationEndStrategy strategy)
      Remove the passed strategy from the registry.
    • resolveStrategy

      @Nullable public abstract AsyncOperationEndStrategy resolveStrategy(Class<?> returnType)
      Returns an AsyncOperationEndStrategy that is able to compose over returnType, or null if passed type is not supported by any of the strategies stored in this registry.