public class CacheAdapterImpl extends Object implements CacheAdapter
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(Object listener)
Add listener to this cache.
|
void |
broadcastEvictAll()
TODO
|
void |
clear()
Clear the cache.
|
boolean |
containsKey(Object key)
Method to check whether a certain key exists in this cache.
|
void |
evict(Object key)
Evict the given key from memory.
|
Object |
get(Object key)
Performs an
get(Object) on the cache, wrapping any exception in a CacheException. |
AddressAdapter |
getAddress()
Get local cluster address.
|
Object |
getAllowingTimeout(Object key)
Performs an
get(Object) on the cache ignoring any TimeoutException
and wrapping any other exception in a CacheException. |
Cache |
getCache() |
Configuration |
getConfiguration()
Get cache configuration.
|
List<AddressAdapter> |
getMembers()
Get cluster members.
|
boolean |
isClusteredInvalidation()
Is this cache participating in a cluster with invalidation?
|
boolean |
isClusteredReplication()
Is this cache participating in a cluster with replication?
|
boolean |
isSynchronous()
Is this cache configured for synchronous communication?
|
Set |
keySet()
Set of keys of this cache.
|
static CacheAdapter |
newInstance(AdvancedCache cache) |
void |
put(Object key,
Object value)
Performs a
put(Object, Object) on the cache,
wrapping any exception in a CacheException. |
void |
putAllowingTimeout(Object key,
Object value)
Performs a
put(Object, Object) on the cache ignoring
any TimeoutException and wrapping any exception in a
CacheException. |
void |
putForExternalRead(Object key,
Object value)
See
Cache.putForExternalRead(Object, Object) for detailed documentation. |
void |
remove(Object key)
Performs a
remove(Object), wrapping any exception in
a CacheException. |
void |
removeListener(Object listener)
Remove listener from cache instance.
|
int |
size()
Size of cache.
|
void |
stop()
Stops the cache.
|
Map |
toMap()
This method returns a Map view of the cache.
|
CacheAdapter |
withFlags(FlagAdapter... flagAdapters)
A builder-style method that adds flags to any cache API call.
|
<T> T |
withinTx(Callable<T> c)
TODO
|
public static CacheAdapter newInstance(AdvancedCache cache)
public boolean isClusteredInvalidation()
CacheAdapterisClusteredInvalidation in interface CacheAdapterpublic boolean isClusteredReplication()
CacheAdapterisClusteredReplication in interface CacheAdapterpublic boolean isSynchronous()
CacheAdapterisSynchronous in interface CacheAdapterpublic Set keySet()
CacheAdapterkeySet in interface CacheAdapterpublic CacheAdapter withFlags(FlagAdapter... flagAdapters)
CacheAdapterwithFlags in interface CacheAdapterflagAdapters - a set of flags to apply. See the FlagAdapter documentation.public Object get(Object key) throws CacheException
CacheAdapterget(Object) on the cache, wrapping any exception in a CacheException.get in interface CacheAdapterkey - key to retrieveCacheExceptionpublic Object getAllowingTimeout(Object key) throws CacheException
CacheAdapterget(Object) on the cache ignoring any TimeoutException
and wrapping any other exception in a CacheException.getAllowingTimeout in interface CacheAdapterkey - key to retrieveCacheExceptionpublic void put(Object key, Object value) throws CacheException
CacheAdapterput(Object, Object) on the cache,
wrapping any exception in a CacheException.put in interface CacheAdapterkey - key whose value will be modifiedvalue - data to store in the cache entryCacheExceptionpublic void putAllowingTimeout(Object key, Object value) throws CacheException
CacheAdapterput(Object, Object) on the cache ignoring
any TimeoutException and wrapping any exception in a
CacheException.putAllowingTimeout in interface CacheAdapterkey - key whose value will be modifiedvalue - data to store in the cache entryCacheExceptionpublic void putForExternalRead(Object key, Object value) throws CacheException
CacheAdapterCache.putForExternalRead(Object, Object) for detailed documentation.putForExternalRead in interface CacheAdapterkey - key with which the specified value is to be associated.value - value to be associated with the specified key.CacheExceptionpublic void remove(Object key) throws CacheException
CacheAdapterremove(Object), wrapping any exception in
a CacheException.remove in interface CacheAdapterkey - key to be removedCacheExceptionpublic void evict(Object key) throws CacheException
CacheAdapterevict in interface CacheAdapterkey - to evict.CacheExceptionpublic void clear()
throws CacheException
CacheAdapterclear in interface CacheAdapterCacheExceptionpublic void stop()
CacheAdapterstop in interface CacheAdapterpublic void addListener(Object listener)
CacheAdapteraddListener in interface CacheAdapterlistener - to be added to cache.public AddressAdapter getAddress()
CacheAdaptergetAddress in interface CacheAdapterpublic List<AddressAdapter> getMembers()
CacheAdaptergetMembers in interface CacheAdapterpublic int size()
CacheAdaptersize in interface CacheAdapterpublic Map toMap()
CacheAdaptertoMap in interface CacheAdapterpublic void removeListener(Object listener)
CacheAdapterremoveListener in interface CacheAdapterlistener - to be removed.public boolean containsKey(Object key)
CacheAdaptercontainsKey in interface CacheAdapterkey - key to look up.public Configuration getConfiguration()
CacheAdaptergetConfiguration in interface CacheAdapterpublic void broadcastEvictAll()
CacheAdapterbroadcastEvictAll in interface CacheAdapterpublic <T> T withinTx(Callable<T> c) throws Exception
CacheAdapterwithinTx in interface CacheAdapterExceptionpublic Cache getCache()
getCache in interface CacheAdapterCopyright © 2012 JBoss by Red Hat. All Rights Reserved.