public interface GridNodeLocalMap<K,V> extends ConcurrentMap<K,V>, GridMetadataAware
GridNodeLocalMap is similar to ThreadLocal in a way that its values are not
distributed and kept only on local node (similar like ThreadLocal values are attached to the
current thread only). Node-local values are used primarily by jobs executed from the remote
nodes to keep intermediate state on the local node between executions.
GridNodeLocalMap essentially is a ConcurrentMap with a few additional methods,
so it is fairly trivial to use.
You can get an instance of GridNodeLocalMap by calling Grid.nodeLocalMap() method.
| Modifier and Type | Method and Description |
|---|---|
V |
addIfAbsent(K key,
Callable<V> dflt)
Gets the value with given key.
|
V |
addIfAbsent(K key,
V val)
Unlike its sibling method
ConcurrentMap.putIfAbsent(Object, Object) this method returns
current mapping from the map. |
putIfAbsent, remove, replace, replaceclear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, valuesaddMeta, addMetaIfAbsent, addMetaIfAbsent, allMeta, copyMeta, copyMeta, hasMeta, hasMeta, meta, putMetaIfAbsent, putMetaIfAbsent, removeMeta, removeMeta, replaceMetaV addIfAbsent(K key, @Nullable Callable<V> dflt)
null
return null.key - Key to get the value for.dflt - Default value producing closure.null if key is not found and
closure is null.V addIfAbsent(K key, V val)
ConcurrentMap.putIfAbsent(Object, Object) this method returns
current mapping from the map.key - Key.val - Value to put if one does not exist.Copyright © 2014. All rights reserved.