Package org.apache.flink.runtime.state
Class StateInitializationContextImpl
- java.lang.Object
-
- org.apache.flink.runtime.state.StateInitializationContextImpl
-
- All Implemented Interfaces:
FunctionInitializationContext
,ManagedInitializationContext
,StateInitializationContext
public class StateInitializationContextImpl extends Object implements StateInitializationContext
Default implementation ofStateInitializationContext
.
-
-
Constructor Summary
Constructors Constructor Description StateInitializationContextImpl(Long restoredCheckpointId, org.apache.flink.api.common.state.OperatorStateStore operatorStateStore, org.apache.flink.api.common.state.KeyedStateStore keyedStateStore, Iterable<KeyGroupStatePartitionStreamProvider> rawKeyedStateInputs, Iterable<StatePartitionStreamProvider> rawOperatorStateInputs)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.flink.api.common.state.KeyedStateStore
getKeyedStateStore()
Returns an interface that allows for registering keyed state with the backend.org.apache.flink.api.common.state.OperatorStateStore
getOperatorStateStore()
Returns an interface that allows for registering operator state with the backend.Iterable<KeyGroupStatePartitionStreamProvider>
getRawKeyedStateInputs()
Returns an iterable to obtain input streams for previously stored keyed state partitions that are assigned to this operator.Iterable<StatePartitionStreamProvider>
getRawOperatorStateInputs()
Returns an iterable to obtain input streams for previously stored operator state partitions that are assigned to this operator.OptionalLong
getRestoredCheckpointId()
Returns id of the restored checkpoint, if state was restored from the snapshot of a previous execution.boolean
isRestored()
Returns true, if state was restored from the snapshot of a previous execution.
-
-
-
Constructor Detail
-
StateInitializationContextImpl
public StateInitializationContextImpl(@Nullable Long restoredCheckpointId, org.apache.flink.api.common.state.OperatorStateStore operatorStateStore, org.apache.flink.api.common.state.KeyedStateStore keyedStateStore, Iterable<KeyGroupStatePartitionStreamProvider> rawKeyedStateInputs, Iterable<StatePartitionStreamProvider> rawOperatorStateInputs)
-
-
Method Detail
-
isRestored
public boolean isRestored()
Description copied from interface:ManagedInitializationContext
Returns true, if state was restored from the snapshot of a previous execution.- Specified by:
isRestored
in interfaceManagedInitializationContext
-
getRestoredCheckpointId
public OptionalLong getRestoredCheckpointId()
Description copied from interface:ManagedInitializationContext
Returns id of the restored checkpoint, if state was restored from the snapshot of a previous execution.- Specified by:
getRestoredCheckpointId
in interfaceManagedInitializationContext
-
getRawOperatorStateInputs
public Iterable<StatePartitionStreamProvider> getRawOperatorStateInputs()
Description copied from interface:StateInitializationContext
Returns an iterable to obtain input streams for previously stored operator state partitions that are assigned to this operator.- Specified by:
getRawOperatorStateInputs
in interfaceStateInitializationContext
-
getRawKeyedStateInputs
public Iterable<KeyGroupStatePartitionStreamProvider> getRawKeyedStateInputs()
Description copied from interface:StateInitializationContext
Returns an iterable to obtain input streams for previously stored keyed state partitions that are assigned to this operator.- Specified by:
getRawKeyedStateInputs
in interfaceStateInitializationContext
-
getOperatorStateStore
public org.apache.flink.api.common.state.OperatorStateStore getOperatorStateStore()
Description copied from interface:ManagedInitializationContext
Returns an interface that allows for registering operator state with the backend.- Specified by:
getOperatorStateStore
in interfaceManagedInitializationContext
-
getKeyedStateStore
public org.apache.flink.api.common.state.KeyedStateStore getKeyedStateStore()
Description copied from interface:ManagedInitializationContext
Returns an interface that allows for registering keyed state with the backend.- Specified by:
getKeyedStateStore
in interfaceManagedInitializationContext
-
-