Class PipelineState
-
- 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 PipelineState extends SpecificRecordBase implements SpecificRecord
State used by the flow engine to track pipeline details and provide diagnostics.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public class
PipelineState.Builder
RecordBuilder for PipelineState instances.
-
Field Summary
Fields Modifier and Type Field Description public final static Schema
SCHEMA$
public RetryState
retryState
public int
maxFlowSleepDuration
public ExceptionEnvelope
pendingPlatformError
public List<SecureHash>
cpkFileHashes
-
Constructor Summary
Constructors Constructor Description PipelineState()
Default constructor. PipelineState(RetryState retryState, Integer maxFlowSleepDuration, ExceptionEnvelope pendingPlatformError, List<SecureHash> cpkFileHashes)
All-args constructor.
-
Method Summary
Modifier and Type Method Description RetryState
getRetryState()
Gets the value of the 'retryState' field. void
setRetryState(RetryState value)
Sets the value of the 'retryState' field. int
getMaxFlowSleepDuration()
Gets the value of the 'maxFlowSleepDuration' field. void
setMaxFlowSleepDuration(int value)
Sets the value of the 'maxFlowSleepDuration' field. ExceptionEnvelope
getPendingPlatformError()
Gets the value of the 'pendingPlatformError' field. void
setPendingPlatformError(ExceptionEnvelope value)
Sets the value of the 'pendingPlatformError' field. List<SecureHash>
getCpkFileHashes()
Gets the value of the 'cpkFileHashes' field. void
setCpkFileHashes(List<SecureHash> value)
Sets the value of the 'cpkFileHashes' field. static Schema
getClassSchema()
static BinaryMessageEncoder<PipelineState>
getEncoder()
Return the BinaryMessageEncoder instance used by this class. static BinaryMessageDecoder<PipelineState>
getDecoder()
Return the BinaryMessageDecoder instance used by this class. static BinaryMessageDecoder<PipelineState>
createDecoder(SchemaStore resolver)
Create a new BinaryMessageDecoder instance for this class that uses the specified SchemaStore. ByteBuffer
toByteBuffer()
Serializes this PipelineState to a ByteBuffer. static PipelineState
fromByteBuffer(ByteBuffer b)
Deserializes a PipelineState from a ByteBuffer. SpecificData
getSpecificData()
Schema
getSchema()
Object
get(int field$)
void
put(int field$, Object value$)
static PipelineState.Builder
newBuilder()
Creates a new PipelineState RecordBuilder. static PipelineState.Builder
newBuilder(PipelineState.Builder other)
Creates a new PipelineState RecordBuilder by copying an existing Builder. static PipelineState.Builder
newBuilder(PipelineState other)
Creates a new PipelineState RecordBuilder by copying an existing PipelineState 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
-
PipelineState
PipelineState()
Default constructor.
-
PipelineState
PipelineState(RetryState retryState, Integer maxFlowSleepDuration, ExceptionEnvelope pendingPlatformError, List<SecureHash> cpkFileHashes)
All-args constructor.- Parameters:
retryState
- Optional retry information for a failed flow event.maxFlowSleepDuration
- The maximum time a flow can sleep, before a Wakeup event is generated (milliseconds)pendingPlatformError
- Used for platform generated errors reported back to user code.cpkFileHashes
- Array of stored cpkFileHashes from the Virtual Node.
-
-
Method Detail
-
getRetryState
RetryState getRetryState()
Gets the value of the 'retryState' field.
-
setRetryState
void setRetryState(RetryState value)
Sets the value of the 'retryState' field. Optional retry information for a failed flow event. Setting this field marks the flow as retrying.
- Parameters:
value
- the value to set.
-
getMaxFlowSleepDuration
int getMaxFlowSleepDuration()
Gets the value of the 'maxFlowSleepDuration' field.
-
setMaxFlowSleepDuration
void setMaxFlowSleepDuration(int value)
Sets the value of the 'maxFlowSleepDuration' field. The maximum time a flow can sleep, before a Wakeup event is generated (milliseconds)
- Parameters:
value
- the value to set.
-
getPendingPlatformError
ExceptionEnvelope getPendingPlatformError()
Gets the value of the 'pendingPlatformError' field.
-
setPendingPlatformError
void setPendingPlatformError(ExceptionEnvelope value)
Sets the value of the 'pendingPlatformError' field. Used for platform generated errors reported back to user code.
- Parameters:
value
- the value to set.
-
getCpkFileHashes
List<SecureHash> getCpkFileHashes()
Gets the value of the 'cpkFileHashes' field.
-
setCpkFileHashes
void setCpkFileHashes(List<SecureHash> value)
Sets the value of the 'cpkFileHashes' field. Array of stored cpkFileHashes from the Virtual Node.
- Parameters:
value
- the value to set.
-
getClassSchema
static Schema getClassSchema()
-
getEncoder
static BinaryMessageEncoder<PipelineState> getEncoder()
Return the BinaryMessageEncoder instance used by this class.
-
getDecoder
static BinaryMessageDecoder<PipelineState> getDecoder()
Return the BinaryMessageDecoder instance used by this class.
-
createDecoder
static BinaryMessageDecoder<PipelineState> 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 PipelineState to a ByteBuffer.
-
fromByteBuffer
static PipelineState fromByteBuffer(ByteBuffer b)
Deserializes a PipelineState 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 PipelineState.Builder newBuilder()
Creates a new PipelineState RecordBuilder.
-
newBuilder
static PipelineState.Builder newBuilder(PipelineState.Builder other)
Creates a new PipelineState RecordBuilder by copying an existing Builder.
- Parameters:
other
- The existing builder to copy.
-
newBuilder
static PipelineState.Builder newBuilder(PipelineState other)
Creates a new PipelineState RecordBuilder by copying an existing PipelineState instance.
- Parameters:
other
- The existing instance to copy.
-
writeExternal
void writeExternal(ObjectOutput out)
-
readExternal
void readExternal(ObjectInput in)
-
-
-
-