org.infinispan.atomic
Interface AtomicMapCache<K,V>

All Superinterfaces:
Cache<K,V>, ConcurrentMap<K,V>, Lifecycle, Listenable, Map<K,V>
All Known Implementing Classes:
CacheDelegate

public interface AtomicMapCache<K,V>
extends Cache<K,V>

This interface adds the getAtomicMap() method which allows users to get a hold of a map type where operations on its elements are all atomic. Refer to the AtomicMap javadocs for more details.

Since:
4.0
Author:
Manik Surtani (manik AT jboss DOT org)
See Also:
AtomicMap

Nested Class Summary
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Method Summary
<AMK,AMV> AtomicMap<AMK,AMV>
getAtomicMap(K key)
          Returns an atomic map.
 
Methods inherited from interface org.infinispan.Cache
clearAsync, compact, endBatch, entrySet, evict, getAdvancedCache, getCacheManager, getConfiguration, getName, getStatus, getVersion, keySet, put, put, putAll, putAll, putAllAsync, putAllAsync, putAllAsync, putAsync, putAsync, putAsync, putForExternalRead, putIfAbsent, putIfAbsent, putIfAbsentAsync, putIfAbsentAsync, putIfAbsentAsync, removeAsync, removeAsync, replace, replace, replace, replace, replaceAsync, replaceAsync, replaceAsync, replaceAsync, replaceAsync, replaceAsync, startBatch, values
 
Methods inherited from interface java.util.concurrent.ConcurrentMap
putIfAbsent, remove, replace, replace
 
Methods inherited from interface java.util.Map
clear, containsKey, containsValue, equals, get, hashCode, isEmpty, put, putAll, remove, size
 
Methods inherited from interface org.infinispan.lifecycle.Lifecycle
start, stop
 
Methods inherited from interface org.infinispan.notifications.Listenable
addListener, getListeners, removeListener
 

Method Detail

getAtomicMap

<AMK,AMV> AtomicMap<AMK,AMV> getAtomicMap(K key)
                                throws ClassCastException
Returns an atomic map. The classes passed in are used to parameterize the Map returned.

Type Parameters:
AMK - map keys
AMV - map values
Parameters:
key - key under which to obtain and store this map in the cache
Returns:
a new or existing atomic map. Never null.
Throws:
ClassCastException - if there already is a value stored under the given key and the type of value cannot be used as an AtomicMap.

Google Analytics

Copyright © 2009 JBoss, a division of Red Hat. All Rights Reserved.