Package net.bytebuddy.agent.builder
Class AgentBuilder.RedefinitionStrategy.BatchAllocator.Slicing
java.lang.Object
net.bytebuddy.agent.builder.AgentBuilder.RedefinitionStrategy.BatchAllocator.Slicing
- All Implemented Interfaces:
AgentBuilder.RedefinitionStrategy.BatchAllocator
- Enclosing interface:
- AgentBuilder.RedefinitionStrategy.BatchAllocator
@Enhance
public static class AgentBuilder.RedefinitionStrategy.BatchAllocator.Slicing
extends Object
implements AgentBuilder.RedefinitionStrategy.BatchAllocator
A slicing batch allocator that assures that any batch is within a certain size range.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static class
An iterable that slices batches into parts of a minimum and maximum size.Nested classes/interfaces inherited from interface net.bytebuddy.agent.builder.AgentBuilder.RedefinitionStrategy.BatchAllocator
AgentBuilder.RedefinitionStrategy.BatchAllocator.ForFixedSize, AgentBuilder.RedefinitionStrategy.BatchAllocator.ForMatchedGrouping, AgentBuilder.RedefinitionStrategy.BatchAllocator.ForTotal, AgentBuilder.RedefinitionStrategy.BatchAllocator.Partitioning, AgentBuilder.RedefinitionStrategy.BatchAllocator.Slicing
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final AgentBuilder.RedefinitionStrategy.BatchAllocator
The delegate batch allocator.private final int
The maximum size of each slice.private final int
The minimum size of each slice.Fields inherited from interface net.bytebuddy.agent.builder.AgentBuilder.RedefinitionStrategy.BatchAllocator
FIRST_BATCH
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Slicing
(int minimum, int maximum, AgentBuilder.RedefinitionStrategy.BatchAllocator batchAllocator) Creates a new slicing batch allocator. -
Method Summary
Modifier and TypeMethodDescriptionSplits a list of types to be retransformed into separate batches.withinRange
(int minimum, int maximum, AgentBuilder.RedefinitionStrategy.BatchAllocator batchAllocator) Creates a new slicing batch allocator.withMaximum
(int maximum, AgentBuilder.RedefinitionStrategy.BatchAllocator batchAllocator) Creates a new slicing batch allocator.withMinimum
(int minimum, AgentBuilder.RedefinitionStrategy.BatchAllocator batchAllocator) Creates a new slicing batch allocator.
-
Field Details
-
minimum
private final int minimumThe minimum size of each slice. -
maximum
private final int maximumThe maximum size of each slice. -
batchAllocator
The delegate batch allocator.
-
-
Constructor Details
-
Slicing
protected Slicing(int minimum, int maximum, AgentBuilder.RedefinitionStrategy.BatchAllocator batchAllocator) Creates a new slicing batch allocator.- Parameters:
minimum
- The minimum size of each slice.maximum
- The maximum size of each slice.batchAllocator
- The delegate batch allocator.
-
-
Method Details
-
withMinimum
public static AgentBuilder.RedefinitionStrategy.BatchAllocator withMinimum(int minimum, AgentBuilder.RedefinitionStrategy.BatchAllocator batchAllocator) Creates a new slicing batch allocator.- Parameters:
minimum
- The minimum size of each slice.batchAllocator
- The delegate batch allocator.- Returns:
- An appropriate slicing batch allocator.
-
withMaximum
public static AgentBuilder.RedefinitionStrategy.BatchAllocator withMaximum(int maximum, AgentBuilder.RedefinitionStrategy.BatchAllocator batchAllocator) Creates a new slicing batch allocator.- Parameters:
maximum
- The maximum size of each slice.batchAllocator
- The delegate batch allocator.- Returns:
- An appropriate slicing batch allocator.
-
withinRange
public static AgentBuilder.RedefinitionStrategy.BatchAllocator withinRange(int minimum, int maximum, AgentBuilder.RedefinitionStrategy.BatchAllocator batchAllocator) Creates a new slicing batch allocator.- Parameters:
minimum
- The minimum size of each slice.maximum
- The maximum size of each slice.batchAllocator
- The delegate batch allocator.- Returns:
- An appropriate slicing batch allocator.
-
batch
Splits a list of types to be retransformed into separate batches.- Specified by:
batch
in interfaceAgentBuilder.RedefinitionStrategy.BatchAllocator
- Parameters:
types
- A list of types which should be retransformed.- Returns:
- An iterable of retransformations within a batch.
-