Package org.apache.flink.runtime.state
Interface StreamStateHandle
- All Superinterfaces:
Serializable,StateObject
- All Known Subinterfaces:
OperatorStateHandle
- All Known Implementing Classes:
ByteStreamStateHandle,DirectoryStreamStateHandle,EmptyFileMergingOperatorStreamStateHandle,EmptySegmentFileStateHandle,FileMergingOperatorStreamStateHandle,FileStateHandle,KeyGroupsSavepointStateHandle,KeyGroupsStateHandle,OperatorStreamStateHandle,PlaceholderStreamStateHandle,RelativeFileStateHandle,RetrievableStreamStateHandle,SegmentFileStateHandle,SharedStateRegistryImpl.EmptyDiscardStateObjectForRegister
A
StateObject that represents state that was written to a stream. The data can be read
back via openInputStream().-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.flink.runtime.state.StateObject
StateObject.StateObjectLocation, StateObject.StateObjectSizeStatsCollector -
Method Summary
Methods inherited from interface org.apache.flink.runtime.state.StateObject
collectSizeStats, discardState, getStateSize
-
Method Details
-
openInputStream
Returns anFSDataInputStreamthat can be used to read back the data that was previously written to the stream.- Throws:
IOException
-
asBytesIfInMemory
Optional<byte[]> asBytesIfInMemory()- Returns:
- Content of this handle as bytes array if it is already in memory.
-
maybeGetPath
- Returns:
- Path to an underlying file represented by this
StreamStateHandleorOptional.empty()if there is no such file.
-
getStreamStateHandleID
PhysicalStateHandleID getStreamStateHandleID()- Returns:
- a unique identifier of this handle.
-