Package net.bytebuddy.agent.builder
Class AgentBuilder.RedefinitionStrategy.BatchAllocator.ForFixedSize
java.lang.Object
net.bytebuddy.agent.builder.AgentBuilder.RedefinitionStrategy.BatchAllocator.ForFixedSize
- All Implemented Interfaces:
AgentBuilder.RedefinitionStrategy.BatchAllocator
- Enclosing interface:
AgentBuilder.RedefinitionStrategy.BatchAllocator
@Enhance
public static class AgentBuilder.RedefinitionStrategy.BatchAllocator.ForFixedSize
extends Object
implements AgentBuilder.RedefinitionStrategy.BatchAllocator
A batch allocator that creates chunks with a fixed size as batch jobs.
-
Nested Class Summary
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
FieldsFields inherited from interface net.bytebuddy.agent.builder.AgentBuilder.RedefinitionStrategy.BatchAllocator
FIRST_BATCH
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
ForFixedSize
(int size) Creates a new batch allocator that creates fixed-sized chunks. -
Method Summary
Modifier and TypeMethodDescriptionSplits a list of types to be retransformed into separate batches.ofSize
(int size) Creates a new batch allocator that creates chunks of a fixed size.
-
Field Details
-
size
private final int sizeThe size of each chunk.
-
-
Constructor Details
-
ForFixedSize
protected ForFixedSize(int size) Creates a new batch allocator that creates fixed-sized chunks.- Parameters:
size
- The size of each chunk.
-
-
Method Details
-
ofSize
Creates a new batch allocator that creates chunks of a fixed size.- Parameters:
size
- The size of each chunk or0
if the batch should be included in a single chunk.- Returns:
- An appropriate 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.
-