Class RetryState

  • All Implemented Interfaces:
    java.io.Externalizable , java.io.Serializable , java.lang.Comparable , org.apache.avro.generic.GenericContainer , org.apache.avro.generic.GenericRecord , org.apache.avro.generic.IndexedRecord , org.apache.avro.specific.SpecificRecord

    
    public class RetryState
    extends SpecificRecordBase implements SpecificRecord
                        

    The Retry State records the need to retry a failed event on the flow Checkpoint

    • Constructor Detail

      • RetryState

        RetryState()
        Default constructor.
      • RetryState

        RetryState(Integer retryCount, FlowEvent failedEvent, ExceptionEnvelope error, Instant firstFailureTimestamp, Instant lastFailureTimestamp)
        All-args constructor.
        Parameters:
        retryCount - The current retry count, set to 0 for the initial failure
        failedEvent - Copy of the event that caused the failure
        error - The original error that caused the retry
        firstFailureTimestamp - The timestamp of when the first exception occurred that triggered a retry
        lastFailureTimestamp - The timestamp of when the last exception occurred that triggered a retry (this will be the same as firstRetryTimestamp for a first time failure
    • Method Detail

      • getRetryCount

         int getRetryCount()

        Gets the value of the 'retryCount' field.

      • setRetryCount

         void setRetryCount(int value)

        Sets the value of the 'retryCount' field. The current retry count, set to 0 for the initial failure

        Parameters:
        value - the value to set.
      • setFailedEvent

         void setFailedEvent(FlowEvent value)

        Sets the value of the 'failedEvent' field. Copy of the event that caused the failure

        Parameters:
        value - the value to set.
      • setError

         void setError(ExceptionEnvelope value)

        Sets the value of the 'error' field. The original error that caused the retry

        Parameters:
        value - the value to set.
      • setFirstFailureTimestamp

         void setFirstFailureTimestamp(Instant value)

        Sets the value of the 'firstFailureTimestamp' field. The timestamp of when the first exception occurred that triggered a retry

        Parameters:
        value - the value to set.
      • setLastFailureTimestamp

         void setLastFailureTimestamp(Instant value)

        Sets the value of the 'lastFailureTimestamp' field. The timestamp of when the last exception occurred that triggered a retry (this will be the same as firstRetryTimestamp for a first time failure

        Parameters:
        value - the value to set.
      • getEncoder

         static BinaryMessageEncoder<RetryState> getEncoder()

        Return the BinaryMessageEncoder instance used by this class.

      • getDecoder

         static BinaryMessageDecoder<RetryState> getDecoder()

        Return the BinaryMessageDecoder instance used by this class.

      • createDecoder

         static BinaryMessageDecoder<RetryState> createDecoder(SchemaStore resolver)

        Create a new BinaryMessageDecoder instance for this class that uses the specified SchemaStore.

        Parameters:
        resolver - a SchemaStore used to find schemas by fingerprint
      • fromByteBuffer

         static RetryState fromByteBuffer(ByteBuffer b)

        Deserializes a RetryState from a ByteBuffer.

        Parameters:
        b - a byte buffer holding serialized data for an instance of this class
      • newBuilder

         static RetryState.Builder newBuilder(RetryState other)

        Creates a new RetryState RecordBuilder by copying an existing RetryState instance.

        Parameters:
        other - The existing instance to copy.