Enum AgentBuilder.RedefinitionStrategy.Listener.Yielding

    • Constructor Detail

      • Yielding

        private Yielding()
    • Method Detail

      • values

        public static AgentBuilder.RedefinitionStrategy.Listener.Yielding[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (AgentBuilder.RedefinitionStrategy.Listener.Yielding c : AgentBuilder.RedefinitionStrategy.Listener.Yielding.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static AgentBuilder.RedefinitionStrategy.Listener.Yielding valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • onBatch

        public void onBatch​(int index,
                            java.util.List<java.lang.Class<?>> batch,
                            java.util.List<java.lang.Class<?>> types)
        Invoked before applying a batch.
        Specified by:
        onBatch in interface AgentBuilder.RedefinitionStrategy.Listener
        Parameters:
        index - A running index of the batch starting at 0.
        batch - The types included in this batch.
        types - All types included in the redefinition.
      • 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
        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.
      • onComplete

        public void onComplete​(int amount,
                               java.util.List<java.lang.Class<?>> types,
                               java.util.Map<java.util.List<java.lang.Class<?>>,​java.lang.Throwable> failures)
        Invoked upon completion of all batches.
        Specified by:
        onComplete in interface AgentBuilder.RedefinitionStrategy.Listener
        Parameters:
        amount - The total amount of batches that were executed.
        types - All types included in the redefinition.
        failures - A mapping of batch types to their unhandled failures.