@HashCodeAndEqualsPlugin.Enhance public static class AgentBuilder.RedefinitionStrategy.Listener.Pausing extends AgentBuilder.RedefinitionStrategy.Listener.Adapter
Thread.sleep(long)
prior to every batch but the first batch.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
Modifier and Type | Field and Description |
---|---|
private long |
value
The time to sleep in milliseconds between every two batches.
|
Modifier | Constructor and Description |
---|---|
protected |
Pausing(long value)
Creates a new pausing listener.
|
Modifier and Type | Method and Description |
---|---|
static AgentBuilder.RedefinitionStrategy.Listener |
of(long value,
java.util.concurrent.TimeUnit timeUnit)
Creates a listener that pauses for the specified amount of time.
|
void |
onBatch(int index,
java.util.List<java.lang.Class<?>> batch,
java.util.List<java.lang.Class<?>> types)
Invoked before applying a batch.
|
onComplete, onError
private final long value
protected Pausing(long value)
value
- The time to sleep in milliseconds between every two batches.public static AgentBuilder.RedefinitionStrategy.Listener of(long value, java.util.concurrent.TimeUnit timeUnit)
0
, a
non-operational listener is returned.value
- The amount of time to pause between redefinition batches.timeUnit
- The time unit of value
.public void onBatch(int index, java.util.List<java.lang.Class<?>> batch, java.util.List<java.lang.Class<?>> types)
AgentBuilder.RedefinitionStrategy.Listener.Adapter
onBatch
in interface AgentBuilder.RedefinitionStrategy.Listener
onBatch
in class AgentBuilder.RedefinitionStrategy.Listener.Adapter
index
- A running index of the batch starting at 0
.batch
- The types included in this batch.types
- All types included in the redefinition.