Package org.apache.flink.runtime.state
Class KeyedStateBackendParametersImpl<K>
- java.lang.Object
-
- org.apache.flink.runtime.state.KeyedStateBackendParametersImpl<K>
-
- Type Parameters:
K
-
- All Implemented Interfaces:
StateBackend.KeyedStateBackendParameters<K>
@Internal public class KeyedStateBackendParametersImpl<K> extends Object implements StateBackend.KeyedStateBackendParameters<K>
Internal POJO implementingStateBackend.KeyedStateBackendParameters
-
-
Constructor Summary
Constructors Constructor Description KeyedStateBackendParametersImpl(Environment env, JobID jobID, String operatorIdentifier, TypeSerializer<K> keySerializer, int numberOfKeyGroups, KeyGroupRange keyGroupRange, TaskKvStateRegistry kvStateRegistry, TtlTimeProvider ttlTimeProvider, MetricGroup metricGroup, Collection<KeyedStateHandle> stateHandles, CloseableRegistry cancelStreamRegistry)
KeyedStateBackendParametersImpl(Environment env, JobID jobID, String operatorIdentifier, TypeSerializer<K> keySerializer, int numberOfKeyGroups, KeyGroupRange keyGroupRange, TaskKvStateRegistry kvStateRegistry, TtlTimeProvider ttlTimeProvider, MetricGroup metricGroup, StateBackend.CustomInitializationMetrics customInitializationMetrics, Collection<KeyedStateHandle> stateHandles, CloseableRegistry cancelStreamRegistry, double managedMemoryFraction)
KeyedStateBackendParametersImpl(StateBackend.KeyedStateBackendParameters<K> parameters)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CloseableRegistry
getCancelStreamRegistry()
StateBackend.CustomInitializationMetrics
getCustomInitializationMetrics()
Environment
getEnv()
JobID
getJobID()
KeyGroupRange
getKeyGroupRange()
TypeSerializer<K>
getKeySerializer()
TaskKvStateRegistry
getKvStateRegistry()
double
getManagedMemoryFraction()
MetricGroup
getMetricGroup()
int
getNumberOfKeyGroups()
String
getOperatorIdentifier()
Collection<KeyedStateHandle>
getStateHandles()
TtlTimeProvider
getTtlTimeProvider()
KeyedStateBackendParametersImpl<K>
setStateHandles(Collection<KeyedStateHandle> stateHandles)
KeyedStateBackendParametersImpl<K>
setTtlTimeProvider(TtlTimeProvider ttlTimeProvider)
-
-
-
Constructor Detail
-
KeyedStateBackendParametersImpl
public KeyedStateBackendParametersImpl(Environment env, JobID jobID, String operatorIdentifier, TypeSerializer<K> keySerializer, int numberOfKeyGroups, KeyGroupRange keyGroupRange, TaskKvStateRegistry kvStateRegistry, TtlTimeProvider ttlTimeProvider, MetricGroup metricGroup, Collection<KeyedStateHandle> stateHandles, CloseableRegistry cancelStreamRegistry)
-
KeyedStateBackendParametersImpl
public KeyedStateBackendParametersImpl(Environment env, JobID jobID, String operatorIdentifier, TypeSerializer<K> keySerializer, int numberOfKeyGroups, KeyGroupRange keyGroupRange, TaskKvStateRegistry kvStateRegistry, TtlTimeProvider ttlTimeProvider, MetricGroup metricGroup, StateBackend.CustomInitializationMetrics customInitializationMetrics, Collection<KeyedStateHandle> stateHandles, CloseableRegistry cancelStreamRegistry, double managedMemoryFraction)
-
KeyedStateBackendParametersImpl
public KeyedStateBackendParametersImpl(StateBackend.KeyedStateBackendParameters<K> parameters)
-
-
Method Detail
-
getEnv
public Environment getEnv()
- Specified by:
getEnv
in interfaceStateBackend.KeyedStateBackendParameters<K>
- Returns:
- The runtime environment of the executing task.
-
getJobID
public JobID getJobID()
- Specified by:
getJobID
in interfaceStateBackend.KeyedStateBackendParameters<K>
-
getOperatorIdentifier
public String getOperatorIdentifier()
- Specified by:
getOperatorIdentifier
in interfaceStateBackend.KeyedStateBackendParameters<K>
-
getKeySerializer
public TypeSerializer<K> getKeySerializer()
- Specified by:
getKeySerializer
in interfaceStateBackend.KeyedStateBackendParameters<K>
-
getNumberOfKeyGroups
public int getNumberOfKeyGroups()
- Specified by:
getNumberOfKeyGroups
in interfaceStateBackend.KeyedStateBackendParameters<K>
-
getKeyGroupRange
public KeyGroupRange getKeyGroupRange()
- Specified by:
getKeyGroupRange
in interfaceStateBackend.KeyedStateBackendParameters<K>
- Returns:
- Range of key-groups for which the to-be-created backend is responsible.
-
getKvStateRegistry
public TaskKvStateRegistry getKvStateRegistry()
- Specified by:
getKvStateRegistry
in interfaceStateBackend.KeyedStateBackendParameters<K>
-
getTtlTimeProvider
public TtlTimeProvider getTtlTimeProvider()
- Specified by:
getTtlTimeProvider
in interfaceStateBackend.KeyedStateBackendParameters<K>
- Returns:
- Provider for TTL logic to judge about state expiration.
-
getMetricGroup
public MetricGroup getMetricGroup()
- Specified by:
getMetricGroup
in interfaceStateBackend.KeyedStateBackendParameters<K>
-
getStateHandles
@Nonnull public Collection<KeyedStateHandle> getStateHandles()
- Specified by:
getStateHandles
in interfaceStateBackend.KeyedStateBackendParameters<K>
-
getCancelStreamRegistry
public CloseableRegistry getCancelStreamRegistry()
- Specified by:
getCancelStreamRegistry
in interfaceStateBackend.KeyedStateBackendParameters<K>
- Returns:
- The registry to which created closeable objects will be * registered during restore.
-
getManagedMemoryFraction
public double getManagedMemoryFraction()
- Specified by:
getManagedMemoryFraction
in interfaceStateBackend.KeyedStateBackendParameters<K>
-
getCustomInitializationMetrics
public StateBackend.CustomInitializationMetrics getCustomInitializationMetrics()
- Specified by:
getCustomInitializationMetrics
in interfaceStateBackend.KeyedStateBackendParameters<K>
-
setStateHandles
public KeyedStateBackendParametersImpl<K> setStateHandles(Collection<KeyedStateHandle> stateHandles)
-
setTtlTimeProvider
public KeyedStateBackendParametersImpl<K> setTtlTimeProvider(TtlTimeProvider ttlTimeProvider)
-
-