Class AgentBuilder.RedefinitionStrategy.Listener.BatchReallocator

    • Constructor Detail

    • Method Detail

      • splitting

        public static AgentBuilder.RedefinitionStrategy.Listener splitting()
        Creates a batch allocator that splits any batch into two parts and resubmits these parts as two batches.
        Returns:
        A batch reallocating batch listener that splits failed batches into two parts for resubmission.
      • onError

        public java.lang.Iterable<? extends java.util.List<java.lang.Class<?>>> onError​(int index,
                                                                                        java.util.List<java.lang.Class<?>> batch,
                                                                                        java.lang.Throwable throwable,
                                                                                        java.util.List<java.lang.Class<?>> types)
        Invoked upon an error during a batch. This method is not invoked if the failure handler handled this error.
        Specified by:
        onError in interface AgentBuilder.RedefinitionStrategy.Listener
        Overrides:
        onError in class AgentBuilder.RedefinitionStrategy.Listener.Adapter
        Parameters:
        index - 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.
        Returns:
        A set of classes which should be attempted to be redefined. Typically, this should be a subset of the classes contained in batch but not all classes.