org.infinispan
Class CacheDelegate<K,V>

java.lang.Object
  extended by org.infinispan.CacheDelegate<K,V>
All Implemented Interfaces:
ConcurrentMap<K,V>, Map<K,V>, AdvancedCache<K,V>, AtomicMapCache<K,V>, Cache<K,V>, Lifecycle, Listenable

public class CacheDelegate<K,V>
extends Object
implements AdvancedCache<K,V>, AtomicMapCache<K,V>

Since:
4.0
Author:
Mircea.Markus@jboss.com

Nested Class Summary
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Field Summary
protected  BatchContainer batchContainer
           
protected  CommandsFactory commandsFactory
           
protected  ComponentRegistry componentRegistry
           
protected  Configuration config
           
protected  InvocationContextContainer invocationContextContainer
           
protected  InterceptorChain invoker
           
protected  Marshaller marshaller
           
protected  CacheNotifier notifier
           
protected  RpcManager rpcManager
           
protected  TransactionManager transactionManager
           
 
Constructor Summary
CacheDelegate(String name)
           
 
Method Summary
 void addInterceptor(CommandInterceptor i, int position)
          Adds a custom interceptor to the interceptor chain, at specified position, where the first interceptor in the chain is at position 0 and the last one at NUM_INTERCEPTORS - 1.
 void addInterceptorAfter(CommandInterceptor i, Class<? extends CommandInterceptor> afterInterceptor)
          Adds a custom interceptor to the interceptor chain, after an instance of the specified interceptor type.
 void addInterceptorBefore(CommandInterceptor i, Class<? extends CommandInterceptor> beforeInterceptor)
          Adds a custom interceptor to the interceptor chain, before an instance of the specified interceptor type.
 void addListener(Object listener)
          Adds a listener to the component.
 void clear()
           
 void clear(Flag... flags)
           
 void compact()
          Method that releases object references of cached objects held in the cache by serializing them to byte buffers.
 boolean containsKey(Object key)
           
 boolean containsKey(Object key, Flag... flags)
           
 boolean containsValue(Object value)
           
 void endBatch(boolean successful)
           
 Set<Map.Entry<K,V>> entrySet()
           
 void evict(K key)
           
 V get(Object key)
           
 V get(Object key, Flag... flags)
           
 AdvancedCache<K,V> getAdvancedCache()
           
<AMK,AMV> AtomicMap<AMK,AMV>
getAtomicMap(K key)
          Returns an atomic map.
 BatchContainer getBatchContainer()
           
 CacheManager getCacheManager()
          Retrieves the cache manager responsible for creating this cache instance.
 ComponentRegistry getComponentRegistry()
           
 Configuration getConfiguration()
           
 DataContainer getDataContainer()
           
 EvictionManager getEvictionManager()
           
 List<CommandInterceptor> getInterceptorChain()
          Retrieves the current Interceptor chain.
 InvocationContextContainer getInvocationContextContainer()
           
 Set<Object> getListeners()
           
 String getName()
           
 RpcManager getRpcManager()
           
 ComponentStatus getStatus()
           
 String getVersion()
           
 void injectDependencies(EvictionManager evictionManager, InvocationContextContainer invocationContextContainer, CommandsFactory commandsFactory, InterceptorChain interceptorChain, Configuration configuration, CacheNotifier notifier, ComponentRegistry componentRegistry, TransactionManager transactionManager, BatchContainer batchContainer, RpcManager rpcManager, DataContainer dataContainer, Marshaller marshaller, ResponseGenerator responseGenerator, CacheManager cacheManager, StateTransferManager stateTransferManager)
           
 boolean isEmpty()
           
 Set<K> keySet()
           
 V put(K key, V value)
           
 V put(K key, V value, Flag... flags)
           
 V put(K key, V value, long lifespan, TimeUnit unit)
          An overloaded form of Map.put(Object, Object), which takes in lifespan parameters.
 V put(K key, V value, long lifespan, TimeUnit lifespanUnit, long maxIdleTime, TimeUnit idleTimeUnit)
          An overloaded form of Map.put(Object, Object), which takes in lifespan parameters.
 V put(K key, V value, long lifespan, TimeUnit lifespanUnit, long maxIdleTime, TimeUnit maxIdleTimeUnit, Flag... flags)
           
 void putAll(Map<? extends K,? extends V> map)
           
 void putAll(Map<? extends K,? extends V> map, Flag... flags)
           
 void putAll(Map<? extends K,? extends V> map, long lifespan, TimeUnit unit)
          An overloaded form of Map.putAll(java.util.Map), which takes in lifespan parameters.
 void putAll(Map<? extends K,? extends V> map, long lifespan, TimeUnit lifespanUnit, long maxIdleTime, TimeUnit idleTimeUnit)
          An overloaded form of Map.putAll(java.util.Map), which takes in lifespan parameters.
 void putAll(Map<? extends K,? extends V> map, long lifespan, TimeUnit lifespanUnit, long maxIdleTime, TimeUnit maxIdleTimeUnit, Flag... flags)
           
 void putForExternalRead(K key, V value)
          Under special operating behavior, associates the value with the specified key.
 void putForExternalRead(K key, V value, Flag... flags)
           
 V putIfAbsent(K key, V value)
           
 V putIfAbsent(K key, V value, Flag... flags)
           
 V putIfAbsent(K key, V value, long lifespan, TimeUnit unit)
          An overloaded form of ConcurrentMap.putIfAbsent(Object, Object), which takes in lifespan parameters.
 V putIfAbsent(K key, V value, long lifespan, TimeUnit lifespanUnit, long maxIdleTime, TimeUnit idleTimeUnit)
          An overloaded form of ConcurrentMap.putIfAbsent(Object, Object), which takes in lifespan parameters.
 V putIfAbsent(K key, V value, long lifespan, TimeUnit lifespanUnit, long maxIdleTime, TimeUnit maxIdleTimeUnit, Flag... flags)
           
 V remove(Object key)
           
 V remove(Object key, Flag... flags)
           
 boolean remove(Object key, Object value)
           
 boolean remove(Object key, Object oldValue, Flag... flags)
           
 void removeInterceptor(Class<? extends CommandInterceptor> interceptorType)
          Removes the interceptor of specified type.
 void removeInterceptor(int position)
          Removes the interceptor at a specified position, where the first interceptor in the chain is at position 0 and the last one at getInterceptorChain().size() - 1.
 void removeListener(Object listener)
          Removes a listener from the component.
 V replace(K key, V value)
           
 V replace(K key, V value, long lifespan, TimeUnit unit)
          An overloaded form of ConcurrentMap.replace(Object, Object), which takes in lifespan parameters.
 V replace(K key, V value, long lifespan, TimeUnit lifespanUnit, long maxIdleTime, TimeUnit idleTimeUnit)
          An overloaded form of ConcurrentMap.replace(Object, Object), which takes in lifespan parameters.
 boolean replace(K key, V oldValue, V newValue)
           
 boolean replace(K key, V oldValue, V value, long lifespan, TimeUnit unit)
          An overloaded form of ConcurrentMap.replace(Object, Object, Object), which takes in lifespan parameters.
 boolean replace(K key, V oldValue, V value, long lifespan, TimeUnit lifespanUnit, long maxIdleTime, TimeUnit idleTimeUnit)
          An overloaded form of ConcurrentMap.replace(Object, Object, Object), which takes in lifespan parameters.
 int size()
           
 void start()
           
 boolean startBatch()
           
 void stop()
           
 String toString()
           
 Collection<V> values()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Field Detail

invocationContextContainer

protected InvocationContextContainer invocationContextContainer

commandsFactory

protected CommandsFactory commandsFactory

invoker

protected InterceptorChain invoker

config

protected Configuration config

notifier

protected CacheNotifier notifier

batchContainer

protected BatchContainer batchContainer

componentRegistry

protected ComponentRegistry componentRegistry

transactionManager

protected TransactionManager transactionManager

rpcManager

protected RpcManager rpcManager

marshaller

protected Marshaller marshaller
Constructor Detail

CacheDelegate

public CacheDelegate(String name)
Method Detail

injectDependencies

public void injectDependencies(EvictionManager evictionManager,
                               InvocationContextContainer invocationContextContainer,
                               CommandsFactory commandsFactory,
                               InterceptorChain interceptorChain,
                               Configuration configuration,
                               CacheNotifier notifier,
                               ComponentRegistry componentRegistry,
                               TransactionManager transactionManager,
                               BatchContainer batchContainer,
                               RpcManager rpcManager,
                               DataContainer dataContainer,
                               Marshaller marshaller,
                               ResponseGenerator responseGenerator,
                               CacheManager cacheManager,
                               StateTransferManager stateTransferManager)

putIfAbsent

public V putIfAbsent(K key,
                     V value)
Specified by:
putIfAbsent in interface ConcurrentMap<K,V>

remove

public boolean remove(Object key,
                      Object value)
Specified by:
remove in interface ConcurrentMap<K,V>

replace

public boolean replace(K key,
                       V oldValue,
                       V newValue)
Specified by:
replace in interface ConcurrentMap<K,V>

replace

public V replace(K key,
                 V value)
Specified by:
replace in interface ConcurrentMap<K,V>

size

public int size()
Specified by:
size in interface Map<K,V>

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface Map<K,V>

containsKey

public boolean containsKey(Object key)
Specified by:
containsKey in interface Map<K,V>

containsValue

public boolean containsValue(Object value)
Specified by:
containsValue in interface Map<K,V>

get

public V get(Object key)
Specified by:
get in interface Map<K,V>

put

public V put(K key,
             V value)
Specified by:
put in interface Map<K,V>

remove

public V remove(Object key)
Specified by:
remove in interface Map<K,V>

putAll

public void putAll(Map<? extends K,? extends V> map)
Specified by:
putAll in interface Map<K,V>

clear

public void clear()
Specified by:
clear in interface Map<K,V>

keySet

public Set<K> keySet()
Specified by:
keySet in interface Map<K,V>

values

public Collection<V> values()
Specified by:
values in interface Map<K,V>

entrySet

public Set<Map.Entry<K,V>> entrySet()
Specified by:
entrySet in interface Map<K,V>

putForExternalRead

public void putForExternalRead(K key,
                               V value)
Description copied from interface: Cache
Under special operating behavior, associates the value with the specified key. This method is for caching data that has an external representation in storage, where, concurrent modification and transactions are not a consideration, and failure to put the data in the cache should be treated as a 'suboptimal outcome' rather than a 'failing outcome'.

An example of when this method is useful is when data is read from, for example, a legacy datastore, and is cached before returning the data to the caller. Subsequent calls would prefer to get the data from the cache and if the data doesn't exist in the cache, fetch again from the legacy datastore.

See JBCACHE-848 for details around this feature.

Specified by:
putForExternalRead in interface Cache<K,V>
Parameters:
key - key with which the specified value is to be associated.
value - value to be associated with the specified key.

evict

public void evict(K key)
Specified by:
evict in interface Cache<K,V>

getConfiguration

public Configuration getConfiguration()
Specified by:
getConfiguration in interface Cache<K,V>

addListener

public void addListener(Object listener)
Description copied from interface: Listenable
Adds a listener to the component. Typically, listeners would need to be annotated with Listener and further to that, contain methods annotated appropriately, otherwise the listener will not be registered.

See the Listener annotation for more information.

Specified by:
addListener in interface Listenable
Parameters:
listener - must not be null.

removeListener

public void removeListener(Object listener)
Description copied from interface: Listenable
Removes a listener from the component.

Specified by:
removeListener in interface Listenable
Parameters:
listener - listener to remove. Must not be null.

getListeners

public Set<Object> getListeners()
Specified by:
getListeners in interface Listenable
Returns:
a set of all listeners registered on this component.

start

public void start()
Specified by:
start in interface Lifecycle

stop

public void stop()
Specified by:
stop in interface Lifecycle

getInterceptorChain

public List<CommandInterceptor> getInterceptorChain()
Description copied from interface: AdvancedCache
Retrieves the current Interceptor chain.

Specified by:
getInterceptorChain in interface AdvancedCache<K,V>
Returns:
an immutable List of CommandInterceptors configured for this cache

addInterceptor

public void addInterceptor(CommandInterceptor i,
                           int position)
Description copied from interface: AdvancedCache
Adds a custom interceptor to the interceptor chain, at specified position, where the first interceptor in the chain is at position 0 and the last one at NUM_INTERCEPTORS - 1.

Specified by:
addInterceptor in interface AdvancedCache<K,V>
Parameters:
i - the interceptor to add
position - the position to add the interceptor

addInterceptorAfter

public void addInterceptorAfter(CommandInterceptor i,
                                Class<? extends CommandInterceptor> afterInterceptor)
Description copied from interface: AdvancedCache
Adds a custom interceptor to the interceptor chain, after an instance of the specified interceptor type. Throws a cache exception if it cannot find an interceptor of the specified type.

Specified by:
addInterceptorAfter in interface AdvancedCache<K,V>
Parameters:
i - interceptor to add
afterInterceptor - interceptor type after which to place custom interceptor

addInterceptorBefore

public void addInterceptorBefore(CommandInterceptor i,
                                 Class<? extends CommandInterceptor> beforeInterceptor)
Description copied from interface: AdvancedCache
Adds a custom interceptor to the interceptor chain, before an instance of the specified interceptor type. Throws a cache exception if it cannot find an interceptor of the specified type.

Specified by:
addInterceptorBefore in interface AdvancedCache<K,V>
Parameters:
i - interceptor to add
beforeInterceptor - interceptor type before which to place custom interceptor

removeInterceptor

public void removeInterceptor(int position)
Description copied from interface: AdvancedCache
Removes the interceptor at a specified position, where the first interceptor in the chain is at position 0 and the last one at getInterceptorChain().size() - 1.

Specified by:
removeInterceptor in interface AdvancedCache<K,V>
Parameters:
position - the position at which to remove an interceptor

removeInterceptor

public void removeInterceptor(Class<? extends CommandInterceptor> interceptorType)
Description copied from interface: AdvancedCache
Removes the interceptor of specified type.

Specified by:
removeInterceptor in interface AdvancedCache<K,V>
Parameters:
interceptorType - type of interceptor to remove

getEvictionManager

public EvictionManager getEvictionManager()
Specified by:
getEvictionManager in interface AdvancedCache<K,V>
Returns:
the eviction manager - if one is configured - for this cache instance

getComponentRegistry

public ComponentRegistry getComponentRegistry()
Specified by:
getComponentRegistry in interface AdvancedCache<K,V>
Returns:
the component registry for this cache instance

putForExternalRead

public void putForExternalRead(K key,
                               V value,
                               Flag... flags)
Specified by:
putForExternalRead in interface AdvancedCache<K,V>

put

public V put(K key,
             V value,
             Flag... flags)
Specified by:
put in interface AdvancedCache<K,V>

put

public V put(K key,
             V value,
             long lifespan,
             TimeUnit lifespanUnit,
             long maxIdleTime,
             TimeUnit maxIdleTimeUnit,
             Flag... flags)
Specified by:
put in interface AdvancedCache<K,V>

putIfAbsent

public V putIfAbsent(K key,
                     V value,
                     Flag... flags)
Specified by:
putIfAbsent in interface AdvancedCache<K,V>

putIfAbsent

public V putIfAbsent(K key,
                     V value,
                     long lifespan,
                     TimeUnit lifespanUnit,
                     long maxIdleTime,
                     TimeUnit maxIdleTimeUnit,
                     Flag... flags)
Specified by:
putIfAbsent in interface AdvancedCache<K,V>

putAll

public void putAll(Map<? extends K,? extends V> map,
                   Flag... flags)
Specified by:
putAll in interface AdvancedCache<K,V>

putAll

public void putAll(Map<? extends K,? extends V> map,
                   long lifespan,
                   TimeUnit lifespanUnit,
                   long maxIdleTime,
                   TimeUnit maxIdleTimeUnit,
                   Flag... flags)
Specified by:
putAll in interface AdvancedCache<K,V>

remove

public V remove(Object key,
                Flag... flags)
Specified by:
remove in interface AdvancedCache<K,V>

remove

public boolean remove(Object key,
                      Object oldValue,
                      Flag... flags)
Specified by:
remove in interface AdvancedCache<K,V>

clear

public void clear(Flag... flags)
Specified by:
clear in interface AdvancedCache<K,V>

containsKey

public boolean containsKey(Object key,
                           Flag... flags)
Specified by:
containsKey in interface AdvancedCache<K,V>

get

public V get(Object key,
             Flag... flags)
Specified by:
get in interface AdvancedCache<K,V>

getStatus

public ComponentStatus getStatus()
Specified by:
getStatus in interface Cache<K,V>

startBatch

public boolean startBatch()
Specified by:
startBatch in interface Cache<K,V>
Returns:
true if a batch was successfully started; false if one was available and already running.

endBatch

public void endBatch(boolean successful)
Specified by:
endBatch in interface Cache<K,V>

getName

public String getName()
Specified by:
getName in interface Cache<K,V>

getVersion

public String getVersion()
Specified by:
getVersion in interface Cache<K,V>

toString

public String toString()
Overrides:
toString in class Object

getAtomicMap

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

Specified by:
getAtomicMap in interface AtomicMapCache<K,V>
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.

getBatchContainer

public BatchContainer getBatchContainer()
Specified by:
getBatchContainer in interface AdvancedCache<K,V>

getInvocationContextContainer

public InvocationContextContainer getInvocationContextContainer()
Specified by:
getInvocationContextContainer in interface AdvancedCache<K,V>

getDataContainer

public DataContainer getDataContainer()
Specified by:
getDataContainer in interface AdvancedCache<K,V>

getCacheManager

public CacheManager getCacheManager()
Description copied from interface: Cache
Retrieves the cache manager responsible for creating this cache instance.

Specified by:
getCacheManager in interface Cache<K,V>
Returns:
a cache manager

put

public final V put(K key,
                   V value,
                   long lifespan,
                   TimeUnit lifespanUnit,
                   long maxIdleTime,
                   TimeUnit idleTimeUnit)
Description copied from interface: Cache
An overloaded form of Map.put(Object, Object), which takes in lifespan parameters.

Specified by:
put in interface Cache<K,V>
Parameters:
key - key to use
value - value to store
lifespan - lifespan of the entry. Negative values are intepreted as unlimited lifespan.
lifespanUnit - time unit for lifespan
maxIdleTime - the maximum amount of time this key is allowed to be idle for before it is considered as expired
idleTimeUnit - time unit for max idle time
Returns:
the value being replaced, or null if nothing is being replaced.

putIfAbsent

public final V putIfAbsent(K key,
                           V value,
                           long lifespan,
                           TimeUnit lifespanUnit,
                           long maxIdleTime,
                           TimeUnit idleTimeUnit)
Description copied from interface: Cache
An overloaded form of ConcurrentMap.putIfAbsent(Object, Object), which takes in lifespan parameters.

Specified by:
putIfAbsent in interface Cache<K,V>
Parameters:
key - key to use
value - value to store
lifespan - lifespan of the entry. Negative values are intepreted as unlimited lifespan.
lifespanUnit - time unit for lifespan
maxIdleTime - the maximum amount of time this key is allowed to be idle for before it is considered as expired
idleTimeUnit - time unit for max idle time
Returns:
the value being replaced, or null if nothing is being replaced.

putAll

public final void putAll(Map<? extends K,? extends V> map,
                         long lifespan,
                         TimeUnit lifespanUnit,
                         long maxIdleTime,
                         TimeUnit idleTimeUnit)
Description copied from interface: Cache
An overloaded form of Map.putAll(java.util.Map), which takes in lifespan parameters. Note that the lifespan is applied to all mappings in the map passed in.

Specified by:
putAll in interface Cache<K,V>
Parameters:
map - map containing mappings to enter
lifespan - lifespan of the entry. Negative values are intepreted as unlimited lifespan.
lifespanUnit - time unit for lifespan
maxIdleTime - the maximum amount of time this key is allowed to be idle for before it is considered as expired
idleTimeUnit - time unit for max idle time

replace

public final V replace(K key,
                       V value,
                       long lifespan,
                       TimeUnit lifespanUnit,
                       long maxIdleTime,
                       TimeUnit idleTimeUnit)
Description copied from interface: Cache
An overloaded form of ConcurrentMap.replace(Object, Object), which takes in lifespan parameters.

Specified by:
replace in interface Cache<K,V>
Parameters:
key - key to use
value - value to store
lifespan - lifespan of the entry. Negative values are intepreted as unlimited lifespan.
lifespanUnit - time unit for lifespan
maxIdleTime - the maximum amount of time this key is allowed to be idle for before it is considered as expired
idleTimeUnit - time unit for max idle time
Returns:
the value being replaced, or null if nothing is being replaced.

replace

public final boolean replace(K key,
                             V oldValue,
                             V value,
                             long lifespan,
                             TimeUnit lifespanUnit,
                             long maxIdleTime,
                             TimeUnit idleTimeUnit)
Description copied from interface: Cache
An overloaded form of ConcurrentMap.replace(Object, Object, Object), which takes in lifespan parameters.

Specified by:
replace in interface Cache<K,V>
Parameters:
key - key to use
oldValue - value to replace
value - value to store
lifespan - lifespan of the entry. Negative values are intepreted as unlimited lifespan.
lifespanUnit - time unit for lifespan
maxIdleTime - the maximum amount of time this key is allowed to be idle for before it is considered as expired
idleTimeUnit - time unit for max idle time
Returns:
true if the value was replaced, false otherwise

put

public V put(K key,
             V value,
             long lifespan,
             TimeUnit unit)
Description copied from interface: Cache
An overloaded form of Map.put(Object, Object), which takes in lifespan parameters.

Specified by:
put in interface Cache<K,V>
Parameters:
key - key to use
value - value to store
lifespan - lifespan of the entry. Negative values are intepreted as unlimited lifespan.
unit - unit of measurement for the lifespan
Returns:
the value being replaced, or null if nothing is being replaced.

putIfAbsent

public V putIfAbsent(K key,
                     V value,
                     long lifespan,
                     TimeUnit unit)
Description copied from interface: Cache
An overloaded form of ConcurrentMap.putIfAbsent(Object, Object), which takes in lifespan parameters.

Specified by:
putIfAbsent in interface Cache<K,V>
Parameters:
key - key to use
value - value to store
lifespan - lifespan of the entry. Negative values are intepreted as unlimited lifespan.
unit - unit of measurement for the lifespan
Returns:
the value being replaced, or null if nothing is being replaced.

putAll

public void putAll(Map<? extends K,? extends V> map,
                   long lifespan,
                   TimeUnit unit)
Description copied from interface: Cache
An overloaded form of Map.putAll(java.util.Map), which takes in lifespan parameters. Note that the lifespan is applied to all mappings in the map passed in.

Specified by:
putAll in interface Cache<K,V>
Parameters:
map - map containing mappings to enter
lifespan - lifespan of the entry. Negative values are intepreted as unlimited lifespan.
unit - unit of measurement for the lifespan

replace

public V replace(K key,
                 V value,
                 long lifespan,
                 TimeUnit unit)
Description copied from interface: Cache
An overloaded form of ConcurrentMap.replace(Object, Object), which takes in lifespan parameters.

Specified by:
replace in interface Cache<K,V>
Parameters:
key - key to use
value - value to store
lifespan - lifespan of the entry. Negative values are intepreted as unlimited lifespan.
unit - unit of measurement for the lifespan
Returns:
the value being replaced, or null if nothing is being replaced.

replace

public boolean replace(K key,
                       V oldValue,
                       V value,
                       long lifespan,
                       TimeUnit unit)
Description copied from interface: Cache
An overloaded form of ConcurrentMap.replace(Object, Object, Object), which takes in lifespan parameters.

Specified by:
replace in interface Cache<K,V>
Parameters:
key - key to use
oldValue - value to replace
value - value to store
lifespan - lifespan of the entry. Negative values are intepreted as unlimited lifespan.
unit - unit of measurement for the lifespan
Returns:
true if the value was replaced, false otherwise

getAdvancedCache

public AdvancedCache<K,V> getAdvancedCache()
Specified by:
getAdvancedCache in interface Cache<K,V>

compact

public void compact()
Description copied from interface: Cache
Method that releases object references of cached objects held in the cache by serializing them to byte buffers. Cached objects are lazily deserialized when accessed again, based on the calling thread's context class loader.

This can be expensive, based on the effort required to serialize cached objects.

Specified by:
compact in interface Cache<K,V>

getRpcManager

public RpcManager getRpcManager()
Specified by:
getRpcManager in interface AdvancedCache<K,V>


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