@HashCodeAndEqualsPlugin.Enhance public static class AgentBuilder.RedefinitionStrategy.Listener.BatchReallocator extends AgentBuilder.RedefinitionStrategy.Listener.Adapter
A batch reallocator allows to split up a failed retransformation into additional batches which are reenqueed to the
current retransformation process. To do so, any batch with at least to classes is rerouted through a AgentBuilder.RedefinitionStrategy.BatchAllocator
which is responsible for regrouping the classes that failed to be retransformed into new batches.
Important: To avoid endless looping over classes that cannot be successfully retransformed, the supplied batch allocator must not resubmit batches that previously failed as an identical outcome is likely.
AgentBuilder.RedefinitionStrategy.Listener.Adapter, AgentBuilder.RedefinitionStrategy.Listener.BatchReallocator, AgentBuilder.RedefinitionStrategy.Listener.Compound, AgentBuilder.RedefinitionStrategy.Listener.ErrorEscalating, AgentBuilder.RedefinitionStrategy.Listener.NoOp, AgentBuilder.RedefinitionStrategy.Listener.Pausing, AgentBuilder.RedefinitionStrategy.Listener.StreamWriting, AgentBuilder.RedefinitionStrategy.Listener.Yielding| Constructor and Description |
|---|
BatchReallocator(AgentBuilder.RedefinitionStrategy.BatchAllocator batchAllocator)
Creates a new batch reallocator.
|
| Modifier and Type | Method and Description |
|---|---|
Iterable<? extends List<Class<?>>> |
onError(int index,
List<Class<?>> batch,
Throwable throwable,
List<Class<?>> types)
Invoked upon an error during a batch.
|
static AgentBuilder.RedefinitionStrategy.Listener |
splitting()
Creates a batch allocator that splits any batch into two parts and resubmits these parts as two batches.
|
onBatch, onCompletepublic BatchReallocator(AgentBuilder.RedefinitionStrategy.BatchAllocator batchAllocator)
batchAllocator - The batch allocator to use for reallocating failed batches.public static AgentBuilder.RedefinitionStrategy.Listener splitting()
public Iterable<? extends List<Class<?>>> onError(int index, List<Class<?>> batch, Throwable throwable, List<Class<?>> types)
AgentBuilder.RedefinitionStrategy.Listener.AdapteronError in interface AgentBuilder.RedefinitionStrategy.ListeneronError in class AgentBuilder.RedefinitionStrategy.Listener.Adapterindex - A running index of the batch starting at 0.batch - The types included in this batch.throwable - The throwable that caused this invocation.types - All types included in the redefinition.batch but not all classes.Copyright © 2014–2019. All rights reserved.