protected static class AgentBuilder.RedefinitionStrategy.ResubmissionStrategy.Enabled.Resubmitter extends AgentBuilder.Listener.Adapter implements AgentBuilder.RedefinitionStrategy.ResubmissionEnforcer
Modifier and Type | Class and Description |
---|---|
protected static class |
AgentBuilder.RedefinitionStrategy.ResubmissionStrategy.Enabled.Resubmitter.ConcurrentHashSet<T>
A set projection for a
ConcurrentHashMap . |
AgentBuilder.RedefinitionStrategy.ResubmissionEnforcer.Disabled
AgentBuilder.Listener.Adapter, AgentBuilder.Listener.Compound, AgentBuilder.Listener.Filtering, AgentBuilder.Listener.ModuleReadEdgeCompleting, AgentBuilder.Listener.NoOp, AgentBuilder.Listener.StreamWriting, AgentBuilder.Listener.WithErrorsOnly, AgentBuilder.Listener.WithTransformationsOnly
LOADED
Modifier | Constructor and Description |
---|---|
protected |
Resubmitter(AgentBuilder.RedefinitionListenable.ResubmissionOnErrorMatcher resubmissionOnErrorMatcher,
AgentBuilder.RedefinitionListenable.ResubmissionImmediateMatcher resubmissionImmediateMatcher,
ConcurrentMap<AgentBuilder.RedefinitionStrategy.ResubmissionStrategy.Enabled.StorageKey,Set<String>> types)
Creates a new resubmitter.
|
Modifier and Type | Method and Description |
---|---|
boolean |
isEnforced(String typeName,
ClassLoader classLoader,
JavaModule module,
Class<?> classBeingRedefined)
Returns
true if a class should be scheduled for resubmission. |
void |
onError(String typeName,
ClassLoader classLoader,
JavaModule module,
boolean loaded,
Throwable throwable)
Invoked when an error has occurred during transformation.
|
onComplete, onDiscovery, onIgnored, onTransformation
protected Resubmitter(AgentBuilder.RedefinitionListenable.ResubmissionOnErrorMatcher resubmissionOnErrorMatcher, AgentBuilder.RedefinitionListenable.ResubmissionImmediateMatcher resubmissionImmediateMatcher, ConcurrentMap<AgentBuilder.RedefinitionStrategy.ResubmissionStrategy.Enabled.StorageKey,Set<String>> types)
resubmissionOnErrorMatcher
- A matcher to determine resubmissions on errors.resubmissionImmediateMatcher
- A matcher to determine resubmissions without errors.types
- A map of class loaders to their types to resubmit.public void onError(String typeName, @MaybeNull ClassLoader classLoader, @MaybeNull JavaModule module, boolean loaded, Throwable throwable)
onError
in interface AgentBuilder.Listener
onError
in class AgentBuilder.Listener.Adapter
typeName
- The binary name of the instrumented type.classLoader
- The class loader which is loading this type or null
if loaded by the boots loader.module
- The instrumented type's module or null
if the current VM does not support modules.loaded
- true
if the type is already loaded.throwable
- The occurred error.public boolean isEnforced(String typeName, @MaybeNull ClassLoader classLoader, @MaybeNull JavaModule module, @MaybeNull Class<?> classBeingRedefined)
true
if a class should be scheduled for resubmission.isEnforced
in interface AgentBuilder.RedefinitionStrategy.ResubmissionEnforcer
typeName
- The name of the instrumented class.classLoader
- The class loader of the instrumented class or null
if the boot loader.module
- The module of the instrumented class or null
if the module system is not supported.classBeingRedefined
- The class to be redefined or null
if the current type is loaded for the first time.true
if the class should be scheduled for resubmission.Copyright © 2014–2024. All rights reserved.