public class ClientCacheAffinityMapping extends Object
| Modifier and Type | Method and Description |
|---|---|
UUID |
affinityNode(IgniteBinary binary,
int cacheId,
Object key)
Calculates affinity node for given cache and key.
|
UUID |
affinityNode(int cacheId,
int part)
Calculates affinity node for given cache and partition.
|
Collection<Integer> |
cacheIds()
Gets cache IDs.
|
static ClientCacheAffinityMapping |
merge(ClientCacheAffinityMapping... mappings)
Merge specified mappings into one instance.
|
static ClientCacheAffinityMapping |
readResponse(org.apache.ignite.internal.client.thin.PayloadInputChannel ch,
Function<Integer,Function<Integer,ClientPartitionAwarenessMapper>> mappers)
Reads caches affinity response from the input channel and creates
ClientCacheAffinityMapping instance
from this response. |
AffinityTopologyVersion |
topologyVersion()
Gets topology version.
|
static void |
writeRequest(org.apache.ignite.internal.client.thin.PayloadOutputChannel ch,
Collection<Integer> cacheIds,
boolean customMappingsRequired)
Writes caches affinity request to the output channel.
|
public AffinityTopologyVersion topologyVersion()
public Collection<Integer> cacheIds()
public UUID affinityNode(IgniteBinary binary, int cacheId, Object key)
binary - Binary data processor (needed to extract affinity field from the key).cacheId - Cache ID.key - Key.null if affinity node can't be determined for given cache and key.public UUID affinityNode(int cacheId, int part)
cacheId - Cache ID.part - Partition.null if affinity node can't be determined for given cache and partition.public static ClientCacheAffinityMapping merge(ClientCacheAffinityMapping... mappings)
public static void writeRequest(org.apache.ignite.internal.client.thin.PayloadOutputChannel ch,
Collection<Integer> cacheIds,
boolean customMappingsRequired)
ch - Output channel.cacheIds - Set of cache ids to request.customMappingsRequired - true if non-default affinity mappings required.public static ClientCacheAffinityMapping readResponse(org.apache.ignite.internal.client.thin.PayloadInputChannel ch, Function<Integer,Function<Integer,ClientPartitionAwarenessMapper>> mappers)
ClientCacheAffinityMapping instance
from this response.ch - Input channel.mappers - Function that produces key mapping functions.
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.15.0 Release Date : April 25 2023