K
- Type of the key.public class InternalKeyContextImpl<K> extends Object implements InternalKeyContext<K>
InternalKeyContext
implementation.Constructor and Description |
---|
InternalKeyContextImpl(KeyGroupRange keyGroupRange,
int numberOfKeyGroups) |
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.
|
public InternalKeyContextImpl(@Nonnull KeyGroupRange keyGroupRange, @Nonnegative int numberOfKeyGroups)
public K getCurrentKey()
InternalKeyContext
getCurrentKey
in interface InternalKeyContext<K>
public int getCurrentKeyGroupIndex()
InternalKeyContext
getCurrentKeyGroupIndex
in interface InternalKeyContext<K>
public int getNumberOfKeyGroups()
InternalKeyContext
getNumberOfKeyGroups
in interface InternalKeyContext<K>
public KeyGroupRange getKeyGroupRange()
InternalKeyContext
getKeyGroupRange
in interface InternalKeyContext<K>
public void setCurrentKey(@Nonnull K currentKey)
InternalKeyContext
setCurrentKey
in interface InternalKeyContext<K>
currentKey
- the current key to set to.public void setCurrentKeyGroupIndex(int currentKeyGroupIndex)
InternalKeyContext
setCurrentKeyGroupIndex
in interface InternalKeyContext<K>
currentKeyGroupIndex
- the current key group index to set to.Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.