@Internal public interface InternalKeyContext<K>
The typical use case for this interface is providing a view on the current-key selection
aspects of KeyedStateBackend
.
Modifier and Type | Method and Description |
---|---|
K |
getCurrentKey()
Used by states to access the current key.
|
int |
getCurrentKeyGroupIndex()
Returns the key-group to which the current key belongs.
|
KeyGroupRange |
getKeyGroupRange()
Returns the key groups for this backend.
|
int |
getNumberOfKeyGroups()
Returns the number of key-groups aka max parallelism.
|
void |
setCurrentKey(K currentKey)
Set current key of the context.
|
void |
setCurrentKeyGroupIndex(int currentKeyGroupIndex)
Set current key group index of the context.
|
K getCurrentKey()
int getCurrentKeyGroupIndex()
int getNumberOfKeyGroups()
KeyGroupRange getKeyGroupRange()
void setCurrentKey(@Nonnull K currentKey)
currentKey
- the current key to set to.void setCurrentKeyGroupIndex(int currentKeyGroupIndex)
currentKeyGroupIndex
- the current key group index to set to.Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.