Class WeakRefAsyncOperationEndStrategies

java.lang.Object
io.opentelemetry.instrumentation.api.annotation.support.async.AsyncOperationEndStrategies
io.opentelemetry.javaagent.tooling.asyncannotationsupport.WeakRefAsyncOperationEndStrategies

public final class WeakRefAsyncOperationEndStrategies extends io.opentelemetry.instrumentation.api.annotation.support.async.AsyncOperationEndStrategies
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    Use the weak reference strategy in the agent.
    void
    registerStrategy(io.opentelemetry.instrumentation.api.annotation.support.async.AsyncOperationEndStrategy strategy)
     
    io.opentelemetry.instrumentation.api.annotation.support.async.AsyncOperationEndStrategy
    resolveStrategy(Class<?> returnType)
     
    void
    unregisterStrategy(io.opentelemetry.instrumentation.api.annotation.support.async.AsyncOperationEndStrategy strategy)
     

    Methods inherited from class io.opentelemetry.instrumentation.api.annotation.support.async.AsyncOperationEndStrategies

    instance, internalSetStrategiesStorage

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • initialize

      public static void initialize()
      Use the weak reference strategy in the agent. This will prevent leaking reference to strategies' classloaders, in case applications get undeployed (and all their classes unloaded).
    • registerStrategy

      public void registerStrategy(io.opentelemetry.instrumentation.api.annotation.support.async.AsyncOperationEndStrategy strategy)
      Specified by:
      registerStrategy in class io.opentelemetry.instrumentation.api.annotation.support.async.AsyncOperationEndStrategies
    • unregisterStrategy

      public void unregisterStrategy(io.opentelemetry.instrumentation.api.annotation.support.async.AsyncOperationEndStrategy strategy)
      Specified by:
      unregisterStrategy in class io.opentelemetry.instrumentation.api.annotation.support.async.AsyncOperationEndStrategies
    • resolveStrategy

      @Nullable public io.opentelemetry.instrumentation.api.annotation.support.async.AsyncOperationEndStrategy resolveStrategy(Class<?> returnType)
      Specified by:
      resolveStrategy in class io.opentelemetry.instrumentation.api.annotation.support.async.AsyncOperationEndStrategies