Class FlowState

  • 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 FlowState
    extends SpecificRecordBase implements SpecificRecord
                        

    State used by the flow engine to track the execution progress of the flow

    • Constructor Detail

      • FlowState

        FlowState()
        Default constructor.
      • FlowState

        FlowState(ByteBuffer fiber, FlowStartContext flowStartContext, ExternalEventState externalEventState, List<SessionState> sessions, List<FlowStackItem> flowStackItems, WaitingFor waitingFor, Integer suspendCount, String suspendedOn)
        All-args constructor.
        Parameters:
        fiber - Flow execution state, serialized at the point the flow was suspended.
        flowStartContext - Context data captured when the flow was started.
        externalEventState - Active external event request.
        sessions - The current open sessions created by/for the executing flow.
        flowStackItems - Used to track calls to sub-flows and their relationship to sessions.
        waitingFor - What this flow requires in order to continue execution.
        suspendCount - Number of times the fiber has suspended.
        suspendedOn - What the previous request was that caused the flow to suspend.
    • Method Detail

      • setFiber

         void setFiber(ByteBuffer value)

        Sets the value of the 'fiber' field. Flow execution state, serialized at the point the flow was suspended.

        Parameters:
        value - the value to set.
      • setFlowStartContext

         void setFlowStartContext(FlowStartContext value)

        Sets the value of the 'flowStartContext' field. Context data captured when the flow was started.

        Parameters:
        value - the value to set.
      • setExternalEventState

         void setExternalEventState(ExternalEventState value)

        Sets the value of the 'externalEventState' field. Active external event request. Null if there are no requests in progress.

        Parameters:
        value - the value to set.
      • setSessions

         void setSessions(List<SessionState> value)

        Sets the value of the 'sessions' field. The current open sessions created by/for the executing flow.

        Parameters:
        value - the value to set.
      • setFlowStackItems

         void setFlowStackItems(List<FlowStackItem> value)

        Sets the value of the 'flowStackItems' field. Used to track calls to sub-flows and their relationship to sessions.

        Parameters:
        value - the value to set.
      • setWaitingFor

         void setWaitingFor(WaitingFor value)

        Sets the value of the 'waitingFor' field. What this flow requires in order to continue execution. For flows that have not started executing, null.

        Parameters:
        value - the value to set.
      • getSuspendCount

         int getSuspendCount()

        Gets the value of the 'suspendCount' field.

      • setSuspendCount

         void setSuspendCount(int value)

        Sets the value of the 'suspendCount' field. Number of times the fiber has suspended.

        Parameters:
        value - the value to set.
      • setSuspendedOn

         void setSuspendedOn(String value)

        Sets the value of the 'suspendedOn' field. What the previous request was that caused the flow to suspend. Null if no suspension has happened. Used for diagnostic purposes.

        Parameters:
        value - the value to set.
      • getEncoder

         static BinaryMessageEncoder<FlowState> getEncoder()

        Return the BinaryMessageEncoder instance used by this class.

      • getDecoder

         static BinaryMessageDecoder<FlowState> getDecoder()

        Return the BinaryMessageDecoder instance used by this class.

      • createDecoder

         static BinaryMessageDecoder<FlowState> 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 FlowState fromByteBuffer(ByteBuffer b)

        Deserializes a FlowState from a ByteBuffer.

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

         static FlowState.Builder newBuilder(FlowState other)

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

        Parameters:
        other - The existing instance to copy.