public interface ClusterNodeLocalMap<K,V> extends ConcurrentMap<K,V>
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 IgniteCluster.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, replace
V 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.
Follow @ApacheIgnite
Apache Ignite Fabric : ver. 1.0.0-RC1 Release Date : February 16 2015