Package net.bytebuddy.agent.builder
Class AgentBuilder.RedefinitionStrategy.ResubmissionStrategy.Enabled.ResubmissionInstallationListener
java.lang.Object
net.bytebuddy.agent.builder.AgentBuilder.InstallationListener.Adapter
net.bytebuddy.agent.builder.AgentBuilder.RedefinitionStrategy.ResubmissionStrategy.Enabled.ResubmissionInstallationListener
- All Implemented Interfaces:
Runnable
,AgentBuilder.InstallationListener
- Enclosing class:
AgentBuilder.RedefinitionStrategy.ResubmissionStrategy.Enabled
protected static class AgentBuilder.RedefinitionStrategy.ResubmissionStrategy.Enabled.ResubmissionInstallationListener
extends AgentBuilder.InstallationListener.Adapter
implements Runnable
A job that resubmits any matched type that previously failed during transformation.
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.bytebuddy.agent.builder.AgentBuilder.InstallationListener
AgentBuilder.InstallationListener.Adapter, AgentBuilder.InstallationListener.Compound, AgentBuilder.InstallationListener.ErrorSuppressing, AgentBuilder.InstallationListener.NoOp, AgentBuilder.InstallationListener.StreamWriting
-
Field Summary
FieldsModifier and TypeFieldDescriptionThis scheduler's cancelable ornull
if no cancelable was registered.private final AgentBuilder.CircularityLock
The circularity lock to use.private final AgentBuilder.DescriptionStrategy
The description strategy to use.private final AgentBuilder.FallbackStrategy
The fallback strategy to use.private final Instrumentation
The instrumentation instance to use.private final AgentBuilder.Listener
The listener to use.private final AgentBuilder.LocationStrategy
The location strategy to use.private final AgentBuilder.RawMatcher
The matcher to apply for analyzing if a type is to be resubmitted.private final AgentBuilder.PoolStrategy
The pool strategy to use.private final AgentBuilder.RedefinitionStrategy.BatchAllocator
The batch allocator to use.private final AgentBuilder.RedefinitionStrategy.Listener
The batch listener to notify.private final AgentBuilder.RedefinitionStrategy
The redefinition strategy to use.private final AgentBuilder.RedefinitionStrategy.ResubmissionScheduler
The resubmission scheduler to use.private final ConcurrentMap
<AgentBuilder.RedefinitionStrategy.ResubmissionStrategy.Enabled.StorageKey, Set<String>> A map of class loaders to their types to resubmit.Fields inherited from interface net.bytebuddy.agent.builder.AgentBuilder.InstallationListener
SUPPRESS_ERROR
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
ResubmissionInstallationListener
(Instrumentation instrumentation, AgentBuilder.RedefinitionStrategy.ResubmissionScheduler resubmissionScheduler, AgentBuilder.PoolStrategy poolStrategy, AgentBuilder.LocationStrategy locationStrategy, AgentBuilder.DescriptionStrategy descriptionStrategy, AgentBuilder.FallbackStrategy fallbackStrategy, AgentBuilder.Listener listener, AgentBuilder.CircularityLock circularityLock, AgentBuilder.RawMatcher matcher, AgentBuilder.RedefinitionStrategy redefinitionStrategy, AgentBuilder.RedefinitionStrategy.BatchAllocator redefinitionBatchAllocator, AgentBuilder.RedefinitionStrategy.Listener redefinitionBatchListener, ConcurrentMap<AgentBuilder.RedefinitionStrategy.ResubmissionStrategy.Enabled.StorageKey, Set<String>> types) Creates a new resubmission job. -
Method Summary
Modifier and TypeMethodDescriptionvoid
onInstall
(Instrumentation instrumentation, ResettableClassFileTransformer classFileTransformer) Invoked upon the successful installation of a class file transformer.void
onReset
(Instrumentation instrumentation, ResettableClassFileTransformer classFileTransformer) Invoked if an installation is reset.void
run()
Methods inherited from class net.bytebuddy.agent.builder.AgentBuilder.InstallationListener.Adapter
onAfterWarmUp, onBeforeInstall, onBeforeWarmUp, onError, onWarmUpError
-
Field Details
-
instrumentation
The instrumentation instance to use. -
resubmissionScheduler
The resubmission scheduler to use. -
locationStrategy
The location strategy to use. -
poolStrategy
The pool strategy to use. -
descriptionStrategy
The description strategy to use. -
fallbackStrategy
The fallback strategy to use. -
listener
The listener to use. -
circularityLock
The circularity lock to use. -
matcher
The matcher to apply for analyzing if a type is to be resubmitted. -
redefinitionStrategy
The redefinition strategy to use. -
redefinitionBatchAllocator
The batch allocator to use. -
redefinitionBatchListener
The batch listener to notify. -
types
private final ConcurrentMap<AgentBuilder.RedefinitionStrategy.ResubmissionStrategy.Enabled.StorageKey,Set<String>> typesA map of class loaders to their types to resubmit. -
cancelable
@MaybeNull private volatile AgentBuilder.RedefinitionStrategy.ResubmissionScheduler.Cancelable cancelableThis scheduler's cancelable ornull
if no cancelable was registered.
-
-
Constructor Details
-
ResubmissionInstallationListener
protected ResubmissionInstallationListener(Instrumentation instrumentation, AgentBuilder.RedefinitionStrategy.ResubmissionScheduler resubmissionScheduler, AgentBuilder.PoolStrategy poolStrategy, AgentBuilder.LocationStrategy locationStrategy, AgentBuilder.DescriptionStrategy descriptionStrategy, AgentBuilder.FallbackStrategy fallbackStrategy, AgentBuilder.Listener listener, AgentBuilder.CircularityLock circularityLock, AgentBuilder.RawMatcher matcher, AgentBuilder.RedefinitionStrategy redefinitionStrategy, AgentBuilder.RedefinitionStrategy.BatchAllocator redefinitionBatchAllocator, AgentBuilder.RedefinitionStrategy.Listener redefinitionBatchListener, ConcurrentMap<AgentBuilder.RedefinitionStrategy.ResubmissionStrategy.Enabled.StorageKey, Set<String>> types) Creates a new resubmission job.- Parameters:
instrumentation
- The instrumentation instance to use.resubmissionScheduler
- The resubmission scheduler to use.poolStrategy
- The pool strategy to use.locationStrategy
- The location strategy to use.descriptionStrategy
- The description strategy to use.fallbackStrategy
- The fallback strategy to use.listener
- The listener to use.circularityLock
- The circularity lock to use.matcher
- The matcher to apply for analyzing if a type is to be resubmitted.redefinitionStrategy
- The redefinition strategy to use.redefinitionBatchAllocator
- The batch allocator to use.redefinitionBatchListener
- The batch listener to notify.types
- A map of class loaders to their types to resubmit.
-
-
Method Details
-
onInstall
public void onInstall(Instrumentation instrumentation, ResettableClassFileTransformer classFileTransformer) Description copied from class:AgentBuilder.InstallationListener.Adapter
Invoked upon the successful installation of a class file transformer. This method is only invoked if no error occurred during the installation or if such an error was handled byAgentBuilder.InstallationListener.onError(Instrumentation, ResettableClassFileTransformer, Throwable)
.- Specified by:
onInstall
in interfaceAgentBuilder.InstallationListener
- Overrides:
onInstall
in classAgentBuilder.InstallationListener.Adapter
- Parameters:
instrumentation
- The instrumentation on which the class file transformer is installed.classFileTransformer
- The class file transformer that is being installed.
-
onReset
public void onReset(Instrumentation instrumentation, ResettableClassFileTransformer classFileTransformer) Description copied from class:AgentBuilder.InstallationListener.Adapter
Invoked if an installation is reset.- Specified by:
onReset
in interfaceAgentBuilder.InstallationListener
- Overrides:
onReset
in classAgentBuilder.InstallationListener.Adapter
- Parameters:
instrumentation
- The instrumentation on which the class file transformer is installed.classFileTransformer
- The class file transformer that is being installed.
-
run
public void run()
-