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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public class
FlowState.Builder
RecordBuilder for FlowState instances.
-
Field Summary
Fields Modifier and Type Field Description public final static Schema
SCHEMA$
public ByteBuffer
fiber
public FlowStartContext
flowStartContext
public ExternalEventState
externalEventState
public List<SessionState>
sessions
public List<FlowStackItem>
flowStackItems
public WaitingFor
waitingFor
public int
suspendCount
public String
suspendedOn
-
Constructor Summary
Constructors Constructor Description FlowState()
Default constructor. FlowState(ByteBuffer fiber, FlowStartContext flowStartContext, ExternalEventState externalEventState, List<SessionState> sessions, List<FlowStackItem> flowStackItems, WaitingFor waitingFor, Integer suspendCount, String suspendedOn)
All-args constructor.
-
Method Summary
Modifier and Type Method Description ByteBuffer
getFiber()
Gets the value of the 'fiber' field. void
setFiber(ByteBuffer value)
Sets the value of the 'fiber' field. FlowStartContext
getFlowStartContext()
Gets the value of the 'flowStartContext' field. void
setFlowStartContext(FlowStartContext value)
Sets the value of the 'flowStartContext' field. ExternalEventState
getExternalEventState()
Gets the value of the 'externalEventState' field. void
setExternalEventState(ExternalEventState value)
Sets the value of the 'externalEventState' field. List<SessionState>
getSessions()
Gets the value of the 'sessions' field. void
setSessions(List<SessionState> value)
Sets the value of the 'sessions' field. List<FlowStackItem>
getFlowStackItems()
Gets the value of the 'flowStackItems' field. void
setFlowStackItems(List<FlowStackItem> value)
Sets the value of the 'flowStackItems' field. WaitingFor
getWaitingFor()
Gets the value of the 'waitingFor' field. void
setWaitingFor(WaitingFor value)
Sets the value of the 'waitingFor' field. int
getSuspendCount()
Gets the value of the 'suspendCount' field. void
setSuspendCount(int value)
Sets the value of the 'suspendCount' field. String
getSuspendedOn()
Gets the value of the 'suspendedOn' field. void
setSuspendedOn(String value)
Sets the value of the 'suspendedOn' field. static Schema
getClassSchema()
static BinaryMessageEncoder<FlowState>
getEncoder()
Return the BinaryMessageEncoder instance used by this class. static BinaryMessageDecoder<FlowState>
getDecoder()
Return the BinaryMessageDecoder instance used by this class. static BinaryMessageDecoder<FlowState>
createDecoder(SchemaStore resolver)
Create a new BinaryMessageDecoder instance for this class that uses the specified SchemaStore. ByteBuffer
toByteBuffer()
Serializes this FlowState to a ByteBuffer. static FlowState
fromByteBuffer(ByteBuffer b)
Deserializes a FlowState from a ByteBuffer. SpecificData
getSpecificData()
Schema
getSchema()
Object
get(int field$)
void
put(int field$, Object value$)
static FlowState.Builder
newBuilder()
Creates a new FlowState RecordBuilder. static FlowState.Builder
newBuilder(FlowState.Builder other)
Creates a new FlowState RecordBuilder by copying an existing Builder. static FlowState.Builder
newBuilder(FlowState other)
Creates a new FlowState RecordBuilder by copying an existing FlowState instance. void
writeExternal(ObjectOutput out)
void
readExternal(ObjectInput in)
-
Methods inherited from class org.apache.avro.specific.SpecificRecordBase
compareTo, customDecode, customEncode, equals, getConversion, hashCode, toString
-
Methods inherited from class org.apache.avro.generic.GenericRecord
hasField
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
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
-
getFiber
ByteBuffer getFiber()
Gets the value of the 'fiber' field.
-
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.
-
getFlowStartContext
FlowStartContext getFlowStartContext()
Gets the value of the 'flowStartContext' field.
-
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.
-
getExternalEventState
ExternalEventState getExternalEventState()
Gets the value of the 'externalEventState' field.
-
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.
-
getSessions
List<SessionState> getSessions()
Gets the value of the 'sessions' field.
-
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.
-
getFlowStackItems
List<FlowStackItem> getFlowStackItems()
Gets the value of the 'flowStackItems' field.
-
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.
-
getWaitingFor
WaitingFor getWaitingFor()
Gets the value of the 'waitingFor' field.
-
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.
-
getSuspendedOn
String getSuspendedOn()
Gets the value of the 'suspendedOn' field.
-
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.
-
getClassSchema
static Schema getClassSchema()
-
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
-
toByteBuffer
ByteBuffer toByteBuffer()
Serializes this FlowState to a ByteBuffer.
-
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
-
getSpecificData
SpecificData getSpecificData()
-
getSchema
Schema getSchema()
-
newBuilder
static FlowState.Builder newBuilder()
Creates a new FlowState RecordBuilder.
-
newBuilder
static FlowState.Builder newBuilder(FlowState.Builder other)
Creates a new FlowState RecordBuilder by copying an existing Builder.
- Parameters:
other
- The existing builder to copy.
-
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.
-
writeExternal
void writeExternal(ObjectOutput out)
-
readExternal
void readExternal(ObjectInput in)
-
-
-
-