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.KeyedStateStoregetKeyedStateStore()Returns an interface that allows for registering keyed state with the backend.org.apache.flink.api.common.state.OperatorStateStoregetOperatorStateStore()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.OptionalLonggetRestoredCheckpointId()Returns id of the restored checkpoint, if state was restored from the snapshot of a previous execution.booleanisRestored()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:ManagedInitializationContextReturns true, if state was restored from the snapshot of a previous execution.- Specified by:
isRestoredin interfaceManagedInitializationContext
-
getRestoredCheckpointId
public OptionalLong getRestoredCheckpointId()
Description copied from interface:ManagedInitializationContextReturns id of the restored checkpoint, if state was restored from the snapshot of a previous execution.- Specified by:
getRestoredCheckpointIdin interfaceManagedInitializationContext
-
getRawOperatorStateInputs
public Iterable<StatePartitionStreamProvider> getRawOperatorStateInputs()
Description copied from interface:StateInitializationContextReturns an iterable to obtain input streams for previously stored operator state partitions that are assigned to this operator.- Specified by:
getRawOperatorStateInputsin interfaceStateInitializationContext
-
getRawKeyedStateInputs
public Iterable<KeyGroupStatePartitionStreamProvider> getRawKeyedStateInputs()
Description copied from interface:StateInitializationContextReturns an iterable to obtain input streams for previously stored keyed state partitions that are assigned to this operator.- Specified by:
getRawKeyedStateInputsin interfaceStateInitializationContext
-
getOperatorStateStore
public org.apache.flink.api.common.state.OperatorStateStore getOperatorStateStore()
Description copied from interface:ManagedInitializationContextReturns an interface that allows for registering operator state with the backend.- Specified by:
getOperatorStateStorein interfaceManagedInitializationContext
-
getKeyedStateStore
public org.apache.flink.api.common.state.KeyedStateStore getKeyedStateStore()
Description copied from interface:ManagedInitializationContextReturns an interface that allows for registering keyed state with the backend.- Specified by:
getKeyedStateStorein interfaceManagedInitializationContext
-
-