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 |
---|---|
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.
|
onComplete, onIgnored, onTransformation
public 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.Listener redefinitionListener)
AgentBuilder.RedefinitionStrategy.RETRANSFORMATION
.instrumentation
- The instrumentation instance to use.redefinitionBatchAllocator
- The redefinition batch allocator.redefinitionListener
- The redefinition listener.public Resubmitting(Instrumentation instrumentation, AgentBuilder.Listener listener, AgentBuilder.LocationStrategy locationStrategy, AgentBuilder.RedefinitionStrategy.BatchAllocator redefinitionBatchAllocator, AgentBuilder.RedefinitionStrategy.Listener redefinitionListener)
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.redefinitionListener
- The redefinition listener.protected Resubmitting(Instrumentation instrumentation, AgentBuilder.Listener listener, AgentBuilder.LocationStrategy locationStrategy, AgentBuilder.RedefinitionStrategy redefinitionStrategy, AgentBuilder.RedefinitionStrategy.BatchAllocator redefinitionBatchAllocator, AgentBuilder.RedefinitionStrategy.Listener redefinitionListener)
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.public void onError(String typeName, ClassLoader classLoader, JavaModule module, boolean loaded, Throwable throwable)
AgentBuilder.Listener
onError
in interface AgentBuilder.Listener
onError
in class AgentBuilder.Listener.Adapter
typeName
- 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 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.