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
public interface StreamStateHandle extends StateObject
AStateObjectthat represents state that was written to a stream. The data can be read back viaopenInputStream().
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.flink.runtime.state.StateObject
StateObject.StateObjectLocation, StateObject.StateObjectSizeStatsCollector
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Optional<byte[]>asBytesIfInMemory()PhysicalStateHandleIDgetStreamStateHandleID()default Optional<org.apache.flink.core.fs.Path>maybeGetPath()org.apache.flink.core.fs.FSDataInputStreamopenInputStream()Returns anFSDataInputStreamthat can be used to read back the data that was previously written to the stream.-
Methods inherited from interface org.apache.flink.runtime.state.StateObject
collectSizeStats, discardState, getStateSize
-
-
-
-
Method Detail
-
openInputStream
org.apache.flink.core.fs.FSDataInputStream openInputStream() throws IOExceptionReturns 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
default Optional<org.apache.flink.core.fs.Path> 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.
-
-