Package org.apache.flink.runtime.state
Class InternalKeyContextImpl<K>
java.lang.Object
org.apache.flink.runtime.state.InternalKeyContextImpl<K>
- Type Parameters:
K- Type of the key.
- All Implemented Interfaces:
InternalKeyContext<K>
The default
InternalKeyContext implementation.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionUsed by states to access the current key.intReturns the key-group to which the current key belongs.Returns the key groups for this backend.intReturns the number of key-groups aka max parallelism.voidsetCurrentKey(K currentKey) Set current key of the context.voidsetCurrentKeyGroupIndex(int currentKeyGroupIndex) Set current key group index of the context.
-
Constructor Details
-
InternalKeyContextImpl
public InternalKeyContextImpl(@Nonnull KeyGroupRange keyGroupRange, @Nonnegative int numberOfKeyGroups)
-
-
Method Details
-
getCurrentKey
Description copied from interface:InternalKeyContextUsed by states to access the current key.- Specified by:
getCurrentKeyin interfaceInternalKeyContext<K>
-
getCurrentKeyGroupIndex
public int getCurrentKeyGroupIndex()Description copied from interface:InternalKeyContextReturns the key-group to which the current key belongs.- Specified by:
getCurrentKeyGroupIndexin interfaceInternalKeyContext<K>
-
getNumberOfKeyGroups
public int getNumberOfKeyGroups()Description copied from interface:InternalKeyContextReturns the number of key-groups aka max parallelism.- Specified by:
getNumberOfKeyGroupsin interfaceInternalKeyContext<K>
-
getKeyGroupRange
Description copied from interface:InternalKeyContextReturns the key groups for this backend.- Specified by:
getKeyGroupRangein interfaceInternalKeyContext<K>
-
setCurrentKey
Description copied from interface:InternalKeyContextSet current key of the context.- Specified by:
setCurrentKeyin interfaceInternalKeyContext<K>- Parameters:
currentKey- the current key to set to.
-
setCurrentKeyGroupIndex
public void setCurrentKeyGroupIndex(int currentKeyGroupIndex) Description copied from interface:InternalKeyContextSet current key group index of the context.- Specified by:
setCurrentKeyGroupIndexin interfaceInternalKeyContext<K>- Parameters:
currentKeyGroupIndex- the current key group index to set to.
-