public static class AgentBuilder.Listener.Resubmitting extends AgentBuilder.Listener.Adapter implements Runnable
| Modifier and Type | Class and Description |
|---|---|
protected static class |
AgentBuilder.Listener.Resubmitting.LookupKey
A key for a class loader that can only be used for looking up a preexisting value but avoids reference management.
|
protected static class |
AgentBuilder.Listener.Resubmitting.StorageKey
A key for a class loader that only weakly references the class loader.
|
AgentBuilder.Listener.Adapter, AgentBuilder.Listener.Compound, AgentBuilder.Listener.Filtering, AgentBuilder.Listener.ModuleReadEdgeCompleting, AgentBuilder.Listener.NoOp, AgentBuilder.Listener.Resubmitting, AgentBuilder.Listener.StreamWriting| Modifier and Type | Method and Description |
|---|---|
AgentBuilder.Listener.Resubmitting |
filter(ElementMatcher<? super Throwable> matcher)
Narrows this type matcher to only be applied onto certain exceptions caused by the instrumentation process.
|
void |
onError(String typeName,
ClassLoader classLoader,
JavaModule module,
boolean loaded,
Throwable throwable)
Invoked when an error has occurred during transformation.
|
void |
run() |
AgentBuilder.Listener |
scheduled(ScheduledExecutorService executorService,
long time,
TimeUnit timeUnit)
Schedules this resubmitter at the specified rate.
|
AgentBuilder.Listener.Resubmitting |
with(AgentBuilder.RedefinitionStrategy.Listener redefinitionListener)
Applies the supplied redefinition listener additionally to any previously registered listeners.
|
onComplete, onIgnored, onTransformationpublic Resubmitting(Instrumentation instrumentation)
AgentBuilder.RedefinitionStrategy.RETRANSFORMATION. During
the retransformation, all types are submitted in a single batch and no listener is notified.instrumentation - The instrumentation instance to use.public Resubmitting(Instrumentation instrumentation, AgentBuilder.RedefinitionStrategy.BatchAllocator redefinitionBatchAllocator)
AgentBuilder.RedefinitionStrategy.RETRANSFORMATION.instrumentation - The instrumentation instance to use.redefinitionBatchAllocator - The redefinition batch allocator.public Resubmitting(Instrumentation instrumentation, AgentBuilder.Listener listener, AgentBuilder.LocationStrategy locationStrategy, AgentBuilder.RedefinitionStrategy.BatchAllocator redefinitionBatchAllocator)
AgentBuilder.RedefinitionStrategy.REDEFINITION.instrumentation - The instrumentation instance to use.listener - The listener to notify when a location strategy fails for a type.locationStrategy - The location strategy to use.redefinitionBatchAllocator - The redefinition batch allocator.protected Resubmitting(Instrumentation instrumentation, AgentBuilder.Listener listener, AgentBuilder.LocationStrategy locationStrategy, AgentBuilder.RedefinitionStrategy redefinitionStrategy, AgentBuilder.RedefinitionStrategy.BatchAllocator redefinitionBatchAllocator, AgentBuilder.RedefinitionStrategy.Listener redefinitionListener, ElementMatcher.Junction<? super Throwable> matcher)
instrumentation - The instrumentation instance to use.listener - The listener to notify when a location strategy fails for a type.locationStrategy - The location strategy to use.redefinitionStrategy - The redefinition strategy to use.redefinitionBatchAllocator - The redefinition batch allocator.redefinitionListener - The redefinition listener.matcher - The matcher to apply onto occured exceptions.public void onError(String typeName, ClassLoader classLoader, JavaModule module, boolean loaded, Throwable throwable)
AgentBuilder.ListeneronError in interface AgentBuilder.ListeneronError in class AgentBuilder.Listener.AdaptertypeName - The type name of the instrumented type.classLoader - The class loader which is loading this type.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 AgentBuilder.Listener.Resubmitting with(AgentBuilder.RedefinitionStrategy.Listener redefinitionListener)
redefinitionListener - The redefinition listener to apply.public AgentBuilder.Listener.Resubmitting filter(ElementMatcher<? super Throwable> matcher)
matcher - The matcher that filters any throwables of the instrumentation process.public AgentBuilder.Listener scheduled(ScheduledExecutorService executorService, long time, TimeUnit timeUnit)
executorService - The executor service to which the task is scheduled.time - The time between two resubmissions.timeUnit - The time unit of the specified time.Copyright © 2014–2017. All rights reserved.