@Internal public class StreamTaskState extends Object implements Serializable, Closeable
AbstractStreamOperator.
This state consists of any combination of those three:
| Constructor and Description |
|---|
StreamTaskState() |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
discardState()
Discards all the contained states and sets them to null.
|
org.apache.flink.runtime.state.StateHandle<Serializable> |
getFunctionState() |
HashMap<String,org.apache.flink.runtime.state.KvStateSnapshot<?,?,?,?,?>> |
getKvStates() |
org.apache.flink.runtime.state.StateHandle<?> |
getOperatorState() |
boolean |
isEmpty()
Checks if this state object actually contains any state, or if all of the state
fields are null.
|
void |
setFunctionState(org.apache.flink.runtime.state.StateHandle<Serializable> functionState) |
void |
setKvStates(HashMap<String,org.apache.flink.runtime.state.KvStateSnapshot<?,?,?,?,?>> kvStates) |
void |
setOperatorState(org.apache.flink.runtime.state.StateHandle<?> operatorState) |
public org.apache.flink.runtime.state.StateHandle<?> getOperatorState()
public void setOperatorState(org.apache.flink.runtime.state.StateHandle<?> operatorState)
public org.apache.flink.runtime.state.StateHandle<Serializable> getFunctionState()
public void setFunctionState(org.apache.flink.runtime.state.StateHandle<Serializable> functionState)
public HashMap<String,org.apache.flink.runtime.state.KvStateSnapshot<?,?,?,?,?>> getKvStates()
public void setKvStates(HashMap<String,org.apache.flink.runtime.state.KvStateSnapshot<?,?,?,?,?>> kvStates)
public boolean isEmpty()
public void discardState()
throws Exception
Exception - Forwards exceptions that occur when releasing the
state handles and snapshots.public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionCopyright © 2014–2016 The Apache Software Foundation. All rights reserved.