public class GridAffinityProcessor extends GridProcessorAdapter
ctx, 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> Map<GridNode,Collection<K>> |
mapKeysToNodes(Collection<? extends K> keys)
Maps keys to nodes on default cache.
|
<K> Map<GridNode,Collection<K>> |
mapKeysToNodes(String cacheName,
Collection<? extends K> keys)
Maps keys to nodes for given cache.
|
<K> GridNode |
mapKeyToNode(K key)
Maps single key to a node on default cache.
|
<K> GridNode |
mapKeyToNode(String cacheName,
K key)
Maps single key to a node.
|
void |
onKernalStart()
Callback that notifies that kernal has successfully started,
including all managers and processors.
|
void |
onKernalStop(boolean cancel)
Callback to notify that kernal is about to stop.
|
void |
printMemoryStats()
Prints memory statistics (sizes of internal structures, etc.).
|
addAttributes, assertParameter, collectDiscoveryData, onDiscoveryDataReceived, start, stop, toString, validateNodepublic GridAffinityProcessor(GridKernalContext ctx)
ctx - Context.public void onKernalStart()
throws GridException
onKernalStart in interface GridComponentonKernalStart in class GridProcessorAdapterGridException - Thrown 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<GridNode,Collection<K>> mapKeysToNodes(@Nullable String cacheName, @Nullable Collection<? extends K> keys) throws GridException
cacheName - Cache name.keys - Keys to map.GridException - If failed.public <K> Map<GridNode,Collection<K>> mapKeysToNodes(@Nullable Collection<? extends K> keys) throws GridException
keys - Keys to map.GridException - If failed.@Nullable public <K> GridNode mapKeyToNode(@Nullable String cacheName, K key) throws GridException
cacheName - Cache name.key - Key to map.GridException - If failed.@Nullable public <K> GridNode mapKeyToNode(K key) throws GridException
key - Key to map.GridException - If failed.@Nullable public Object affinityKey(@Nullable String cacheName, @Nullable Object key) throws GridException
cacheName - Cache name.key - Cache key.GridException - In case of error.public void printMemoryStats()
printMemoryStats in interface GridComponentprintMemoryStats in class GridProcessorAdapterCopyright © 2014. All rights reserved.