@Internal public class DefaultOperatorStateBackend extends Object implements OperatorStateBackend
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_OPERATOR_STATE_NAME
The default namespace for state in cases where no state name is provided
|
| Constructor and Description |
|---|
DefaultOperatorStateBackend(ClassLoader userClassLoader,
ExecutionConfig executionConfig,
boolean asynchronousSnapshots) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
dispose()
Disposes the backend and releases all resources.
|
ExecutionConfig |
getExecutionConfig() |
<S> ListState<S> |
getListState(ListStateDescriptor<S> stateDescriptor) |
<S> ListState<S> |
getOperatorState(ListStateDescriptor<S> stateDescriptor)
Deprecated.
This was deprecated as part of a refinement to the function names.
Please use
getListState(ListStateDescriptor) instead. |
Set<String> |
getRegisteredStateNames() |
<T extends Serializable> |
getSerializableListState(String stateName)
Deprecated.
Using Java serialization for persisting state is not encouraged.
Please use
getListState(ListStateDescriptor) instead. |
<S> ListState<S> |
getUnionListState(ListStateDescriptor<S> stateDescriptor) |
void |
restore(Collection<OperatorStateHandle> restoreSnapshots)
Restores state that was previously snapshotted from the provided parameters.
|
RunnableFuture<OperatorStateHandle> |
snapshot(long checkpointId,
long timestamp,
CheckpointStreamFactory streamFactory,
CheckpointOptions checkpointOptions)
Operation that writes a snapshot into a stream that is provided by the given
CheckpointStreamFactory and
returns a @RunnableFuture that gives a state handle to the snapshot. |
public static final String DEFAULT_OPERATOR_STATE_NAME
public DefaultOperatorStateBackend(ClassLoader userClassLoader, ExecutionConfig executionConfig, boolean asynchronousSnapshots) throws IOException
IOExceptionpublic ExecutionConfig getExecutionConfig()
public Set<String> getRegisteredStateNames()
getRegisteredStateNames in interface OperatorStateStorepublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionpublic void dispose()
OperatorStateBackenddispose in interface OperatorStateBackendpublic <S> ListState<S> getListState(ListStateDescriptor<S> stateDescriptor) throws Exception
getListState in interface OperatorStateStoreExceptionpublic <S> ListState<S> getUnionListState(ListStateDescriptor<S> stateDescriptor) throws Exception
getUnionListState in interface OperatorStateStoreException@Deprecated public <S> ListState<S> getOperatorState(ListStateDescriptor<S> stateDescriptor) throws Exception
getListState(ListStateDescriptor) instead.getOperatorState in interface OperatorStateStoreException@Deprecated public <T extends Serializable> ListState<T> getSerializableListState(String stateName) throws Exception
getListState(ListStateDescriptor) instead.getSerializableListState in interface OperatorStateStoreExceptionpublic RunnableFuture<OperatorStateHandle> snapshot(long checkpointId, long timestamp, CheckpointStreamFactory streamFactory, CheckpointOptions checkpointOptions) throws Exception
SnapshotableCheckpointStreamFactory and
returns a @RunnableFuture that gives a state handle to the snapshot. It is up to the implementation if
the operation is performed synchronous or asynchronous. In the later case, the returned Runnable must be executed
first before obtaining the handle.snapshot in interface Snapshotable<OperatorStateHandle>checkpointId - The ID of the checkpoint.timestamp - The timestamp of the checkpoint.streamFactory - The factory that we can use for writing our state to streams.checkpointOptions - Options for how to perform this checkpoint.StateObject.Exceptionpublic void restore(Collection<OperatorStateHandle> restoreSnapshots) throws Exception
Snapshotablerestore in interface Snapshotable<OperatorStateHandle>restoreSnapshots - the old state to restore.ExceptionCopyright © 2014–2017 The Apache Software Foundation. All rights reserved.