Interface AgentBuilder.RedefinitionStrategy.BatchAllocator

All Known Implementing Classes:
AgentBuilder.RedefinitionStrategy.BatchAllocator.ForFixedSize, AgentBuilder.RedefinitionStrategy.BatchAllocator.ForMatchedGrouping, AgentBuilder.RedefinitionStrategy.BatchAllocator.ForTotal, AgentBuilder.RedefinitionStrategy.BatchAllocator.Partitioning, AgentBuilder.RedefinitionStrategy.BatchAllocator.Slicing
Enclosing class:
AgentBuilder.RedefinitionStrategy

public static interface AgentBuilder.RedefinitionStrategy.BatchAllocator
A batch allocator which is responsible for applying a redefinition in a batches. A class redefinition or retransformation can be a time-consuming operation rendering a JVM non-responsive. In combination with a a AgentBuilder.RedefinitionStrategy.Listener, it is also possible to apply pauses between batches to distribute the load of a retransformation over time.
  • Field Details

    • FIRST_BATCH

      static final int FIRST_BATCH
      The index of the first batch.
      See Also:
  • Method Details

    • batch

      Iterable<? extends List<Class<?>>> batch(List<Class<?>> types)
      Splits a list of types to be retransformed into separate batches.
      Parameters:
      types - A list of types which should be retransformed.
      Returns:
      An iterable of retransformations within a batch.