|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.hibernate.cache.infinispan.util.CacheAdapterImpl
public class CacheAdapterImpl
CacheAdapterImpl.
Method Summary | ||
---|---|---|
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 . |
|
org.infinispan.Cache |
getCache()
|
|
org.infinispan.config.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(org.infinispan.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. |
|
|
withinTx(Callable<T> c)
TODO |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static CacheAdapter newInstance(org.infinispan.AdvancedCache cache)
public boolean isClusteredInvalidation()
CacheAdapter
isClusteredInvalidation
in interface CacheAdapter
public boolean isClusteredReplication()
CacheAdapter
isClusteredReplication
in interface CacheAdapter
public boolean isSynchronous()
CacheAdapter
isSynchronous
in interface CacheAdapter
public Set keySet()
CacheAdapter
keySet
in interface CacheAdapter
public CacheAdapter withFlags(FlagAdapter... flagAdapters)
CacheAdapter
withFlags
in interface CacheAdapter
flagAdapters
- a set of flags to apply. See the FlagAdapter
documentation.
public Object get(Object key) throws CacheException
CacheAdapter
get(Object)
on the cache, wrapping any exception in a CacheException
.
get
in interface CacheAdapter
key
- key to retrieve
CacheException
public Object getAllowingTimeout(Object key) throws CacheException
CacheAdapter
get(Object)
on the cache ignoring any TimeoutException
and wrapping any other exception in a CacheException
.
getAllowingTimeout
in interface CacheAdapter
key
- key to retrieve
CacheException
public void put(Object key, Object value) throws CacheException
CacheAdapter
put(Object, Object)
on the cache,
wrapping any exception in a CacheException
.
put
in interface CacheAdapter
key
- key whose value will be modifiedvalue
- data to store in the cache entry
CacheException
public void putAllowingTimeout(Object key, Object value) throws CacheException
CacheAdapter
put(Object, Object)
on the cache ignoring
any TimeoutException
and wrapping any exception in a
CacheException
.
putAllowingTimeout
in interface CacheAdapter
key
- key whose value will be modifiedvalue
- data to store in the cache entry
CacheException
public void putForExternalRead(Object key, Object value) throws CacheException
CacheAdapter
Cache.putForExternalRead(Object, Object)
for detailed documentation.
putForExternalRead
in interface CacheAdapter
key
- key with which the specified value is to be associated.value
- value to be associated with the specified key.
CacheException
public void remove(Object key) throws CacheException
CacheAdapter
remove(Object)
, wrapping any exception in
a CacheException
.
remove
in interface CacheAdapter
key
- key to be removed
CacheException
public void evict(Object key) throws CacheException
CacheAdapter
evict
in interface CacheAdapter
key
- to evict.
CacheException
public void clear() throws CacheException
CacheAdapter
clear
in interface CacheAdapter
CacheException
public void stop()
CacheAdapter
stop
in interface CacheAdapter
public void addListener(Object listener)
CacheAdapter
addListener
in interface CacheAdapter
listener
- to be added to cache.public AddressAdapter getAddress()
CacheAdapter
getAddress
in interface CacheAdapter
public List<AddressAdapter> getMembers()
CacheAdapter
getMembers
in interface CacheAdapter
public int size()
CacheAdapter
size
in interface CacheAdapter
public Map toMap()
CacheAdapter
toMap
in interface CacheAdapter
public void removeListener(Object listener)
CacheAdapter
removeListener
in interface CacheAdapter
listener
- to be removed.public boolean containsKey(Object key)
CacheAdapter
containsKey
in interface CacheAdapter
key
- key to look up.
public org.infinispan.config.Configuration getConfiguration()
CacheAdapter
getConfiguration
in interface CacheAdapter
public void broadcastEvictAll()
CacheAdapter
broadcastEvictAll
in interface CacheAdapter
public <T> T withinTx(Callable<T> c) throws Exception
CacheAdapter
withinTx
in interface CacheAdapter
Exception
public org.infinispan.Cache getCache()
getCache
in interface CacheAdapter
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |