public class GridAffinityProcessor extends GridProcessorAdapter
GridComponent.DiscoveryDataExchangeTypectx, log| Constructor and Description |
|---|
GridAffinityProcessor(GridKernalContext ctx) |
| Modifier and Type | Method and Description |
|---|---|
Object |
affinityKey(String cacheName,
Object key)
Gets affinity key for cache key.
|
<K> org.apache.ignite.internal.processors.affinity.GridAffinityProcessor.CacheAffinityProxy<K> |
affinityProxy(String cacheName) |
<K> Map<ClusterNode,Collection<K>> |
mapKeysToNodes(String cacheName,
Collection<? extends K> keys)
Maps keys to nodes for given cache.
|
<K> ClusterNode |
mapKeyToNode(String cacheName,
K key)
Maps single key to a node.
|
<K> ClusterNode |
mapKeyToNode(String cacheName,
K key,
AffinityTopologyVersion topVer)
Maps single key to a node.
|
<K> List<ClusterNode> |
mapKeyToPrimaryAndBackups(String cacheName,
K key)
Map single key to primary and backup nodes.
|
void |
onKernalStop(boolean cancel)
Callback to notify that kernal is about to stop.
|
void |
printMemoryStats()
Prints memory statistics (sizes of internal structures, etc.).
|
void |
start()
Starts grid component.
|
assertParameter, collectDiscoveryData, discoveryDataType, onDiscoveryDataReceived, onKernalStart, stop, toString, validateNodepublic GridAffinityProcessor(GridKernalContext ctx)
ctx - Context.public void start()
throws IgniteCheckedException
start in interface GridComponentstart in class GridProcessorAdapterIgniteCheckedException - Throws in case of any errors.public void onKernalStop(boolean cancel)
onKernalStop in interface GridComponentonKernalStop in class GridProcessorAdaptercancel - Flag indicating whether jobs should be canceled.public <K> Map<ClusterNode,Collection<K>> mapKeysToNodes(@Nullable String cacheName, @Nullable Collection<? extends K> keys) throws IgniteCheckedException
cacheName - Cache name.keys - Keys to map.IgniteCheckedException - If failed.@Nullable public <K> ClusterNode mapKeyToNode(@Nullable String cacheName, K key) throws IgniteCheckedException
cacheName - Cache name.key - Key to map.IgniteCheckedException - If failed.@Nullable public <K> ClusterNode mapKeyToNode(@Nullable String cacheName, K key, AffinityTopologyVersion topVer) throws IgniteCheckedException
cacheName - Cache name.key - Key to map.IgniteCheckedException - If failed.public <K> List<ClusterNode> mapKeyToPrimaryAndBackups(@Nullable String cacheName, K key) throws IgniteCheckedException
cacheName - Cache name.key - Key to map.IgniteCheckedException - If failed.@Nullable public Object affinityKey(@Nullable String cacheName, @Nullable Object key) throws IgniteCheckedException
cacheName - Cache name.key - Cache key.IgniteCheckedException - In case of error.public <K> org.apache.ignite.internal.processors.affinity.GridAffinityProcessor.CacheAffinityProxy<K> affinityProxy(String cacheName)
cacheName - Cache name.public void printMemoryStats()
printMemoryStats in interface GridComponentprintMemoryStats in class GridProcessorAdapter
Follow @ApacheIgnite
Ignite Fabric : ver. 1.0.0 Release Date : March 31 2015