Class CoherenceCache
- java.lang.Object
 - 
- com.oracle.coherence.spring.cache.CoherenceCache
 
 
- 
- 
Nested Class Summary
- 
Nested classes/interfaces inherited from interface org.springframework.cache.Cache
Cache.ValueRetrievalException, Cache.ValueWrapper 
 - 
 
- 
Constructor Summary
Constructors Constructor Description CoherenceCache(com.tangosol.net.NamedCache<java.lang.Object,java.lang.Object> cache, CoherenceCacheConfiguration cacheConfiguration)Construct the CoherenceCache. 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()voidevict(java.lang.Object key)Cache.ValueWrapperget(java.lang.Object key)<T> Tget(java.lang.Object key, java.lang.Class<T> type)<T> Tget(java.lang.Object key, java.util.concurrent.Callable<T> valueLoader)Return the value to which this cache maps the specified key.CoherenceCacheConfigurationgetCacheConfiguration()Return the usedCoherenceCacheConfiguration.java.lang.StringgetName()java.lang.ObjectgetNativeCache()voidput(java.lang.Object key, java.lang.Object value)intsize()Returns the number of key-value mappings of the underlyingNamedCache.- 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait 
- 
Methods inherited from interface org.springframework.cache.Cache
evictIfPresent, invalidate, putIfAbsent 
 - 
 
 - 
 
- 
- 
Constructor Detail
- 
CoherenceCache
public CoherenceCache(com.tangosol.net.NamedCache<java.lang.Object,java.lang.Object> cache, CoherenceCacheConfiguration cacheConfiguration)Construct the CoherenceCache.- Parameters:
 cache- must not be nullcacheConfiguration- must not be null
 
 - 
 
- 
Method Detail
- 
get
public Cache.ValueWrapper get(java.lang.Object key)
 
- 
get
public <T> T get(java.lang.Object key, java.lang.Class<T> type) 
- 
get
public <T> T get(java.lang.Object key, java.util.concurrent.Callable<T> valueLoader)Return the value to which this cache maps the specified key. If the key does not exist in the cache, the method will obtain that value using the provided valueLoader. In that case, the key will be locked, unlessCoherenceCacheConfiguration.isUseLocks()returns false. 
- 
getNativeCache
public java.lang.Object getNativeCache()
- Specified by:
 getNativeCachein interfaceCache
 
- 
put
public void put(java.lang.Object key, java.lang.Object value) 
- 
size
public int size()
Returns the number of key-value mappings of the underlyingNamedCache.- Returns:
 - the number of key-value mappings in this map
 
 
- 
getCacheConfiguration
public CoherenceCacheConfiguration getCacheConfiguration()
Return the usedCoherenceCacheConfiguration.- Returns:
 - never returns 
null. 
 
 - 
 
 -