Class AsyncOperationEndStrategies
- java.lang.Object
-
- io.opentelemetry.instrumentation.api.annotation.support.async.AsyncOperationEndStrategies
-
public abstract class AsyncOperationEndStrategies extends Object
A global registry ofAsyncOperationEndStrategyimplementations.
-
-
Constructor Summary
Constructors Constructor Description AsyncOperationEndStrategies()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static AsyncOperationEndStrategiesinstance()Obtain instance of the async strategy registry.static voidinternalSetStrategiesStorage(AsyncOperationEndStrategies strategies)Sets the actual strategies' registry implementation.abstract voidregisterStrategy(AsyncOperationEndStrategy strategy)Add the passedstrategyto the registry.abstract AsyncOperationEndStrategyresolveStrategy(Class<?> returnType)Returns anAsyncOperationEndStrategythat is able to compose overreturnType, ornullif passed type is not supported by any of the strategies stored in this registry.abstract voidunregisterStrategy(AsyncOperationEndStrategy strategy)Remove the passedstrategyfrom the registry.
-
-
-
Method Detail
-
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 passedstrategyto the registry.
-
unregisterStrategy
public abstract void unregisterStrategy(AsyncOperationEndStrategy strategy)
Remove the passedstrategyfrom the registry.
-
resolveStrategy
@Nullable public abstract AsyncOperationEndStrategy resolveStrategy(Class<?> returnType)
Returns anAsyncOperationEndStrategythat is able to compose overreturnType, ornullif passed type is not supported by any of the strategies stored in this registry.
-
-