org.infinispan
Class AbstractDelegatingAdvancedCache<K,V>
java.lang.Object
org.infinispan.AbstractDelegatingCache<K,V>
org.infinispan.AbstractDelegatingAdvancedCache<K,V>
- All Implemented Interfaces:
- ConcurrentMap<K,V>, Map<K,V>, AdvancedCache<K,V>, Cache<K,V>, Lifecycle, Listenable
public class AbstractDelegatingAdvancedCache<K,V>
- extends AbstractDelegatingCache<K,V>
- implements AdvancedCache<K,V>
Similar to AbstractDelegatingCache
, but for AdvancedCache
.
- Author:
- Mircea.Markus@jboss.com
- See Also:
AbstractDelegatingCache
Nested classes/interfaces inherited from interface java.util.Map |
Map.Entry<K,V> |
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 |
clear(Flag... flags)
|
boolean |
containsKey(Object key,
Flag... flags)
|
V |
get(Object key,
Flag... flags)
|
BatchContainer |
getBatchContainer()
|
ComponentRegistry |
getComponentRegistry()
|
DataContainer |
getDataContainer()
|
EvictionManager |
getEvictionManager()
|
List<CommandInterceptor> |
getInterceptorChain()
Retrieves the current Interceptor chain. |
InvocationContextContainer |
getInvocationContextContainer()
|
RpcManager |
getRpcManager()
|
V |
put(K key,
V value,
Flag... flags)
|
V |
put(K key,
V value,
long lifespan,
TimeUnit lifespanUnit,
long maxIdleTime,
TimeUnit maxIdleTimeUnit,
Flag... flags)
|
void |
putAll(Map<? extends K,? extends V> map,
Flag... flags)
|
void |
putAll(Map<? extends K,? extends V> map,
long lifespan,
TimeUnit lifespanUnit,
long maxIdleTime,
TimeUnit maxIdleTimeUnit,
Flag... flags)
|
void |
putForExternalRead(K key,
V value,
Flag... flags)
|
V |
putIfAbsent(K key,
V value,
Flag... flags)
|
V |
putIfAbsent(K key,
V value,
long lifespan,
TimeUnit lifespanUnit,
long maxIdleTime,
TimeUnit maxIdleTimeUnit,
Flag... flags)
|
V |
remove(Object key,
Flag... flags)
|
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. |
Methods inherited from class org.infinispan.AbstractDelegatingCache |
addListener, clear, compact, containsKey, containsValue, endBatch, entrySet, evict, get, getAdvancedCache, getCacheManager, getConfiguration, getListeners, getName, getStatus, getVersion, isEmpty, keySet, put, put, put, putAll, putAll, putAll, putForExternalRead, putIfAbsent, putIfAbsent, putIfAbsent, remove, remove, removeListener, replace, replace, replace, replace, replace, replace, size, start, startBatch, stop, values |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.infinispan.Cache |
compact, endBatch, evict, getAdvancedCache, getCacheManager, getConfiguration, getName, getStatus, getVersion, put, put, putAll, putAll, putForExternalRead, putIfAbsent, putIfAbsent, replace, replace, replace, replace, startBatch |
Methods inherited from interface java.util.Map |
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values |
AbstractDelegatingAdvancedCache
public AbstractDelegatingAdvancedCache(AdvancedCache<K,V> 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 addposition
- 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 addafterInterceptor
- 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 addbeforeInterceptor
- 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
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 CommandInterceptor
s
configured for this cache
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
getRpcManager
public RpcManager getRpcManager()
- Specified by:
getRpcManager
in interface AdvancedCache<K,V>
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>
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>
Copyright © 2009 JBoss, a division of Red Hat. All Rights Reserved.