|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.infinispan.AbstractDelegatingCache<K,V>
public abstract class AbstractDelegatingCache<K,V>
This is a convenient base class for implementing a cache delegate. The only constructor takes a Cache argument, to
which each method call is delegated. One can extend this class and override the method sub-set it is interested in.
There is also an similar implmentation for AdvancedCache:
AbstractDelegatingAdvancedCache.
AbstractDelegatingAdvancedCache| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface java.util.Map |
|---|
Map.Entry<K,V> |
| Constructor Summary | |
|---|---|
AbstractDelegatingCache(Cache<K,V> cache)
|
|
| Method Summary | |
|---|---|
void |
addListener(Object listener)
Adds a listener to the component. |
void |
clear()
|
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 |
containsValue(Object value)
|
void |
endBatch(boolean successful)
|
Set<Map.Entry<K,V>> |
entrySet()
|
void |
evict(K key)
|
V |
get(Object key)
|
AdvancedCache<K,V> |
getAdvancedCache()
|
CacheManager |
getCacheManager()
Retrieves the cache manager responsible for creating this cache instance. |
Configuration |
getConfiguration()
|
Set<Object> |
getListeners()
|
String |
getName()
|
ComponentStatus |
getStatus()
|
String |
getVersion()
|
boolean |
isEmpty()
|
Set<K> |
keySet()
|
V |
put(K key,
V value)
|
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 maxIdleTimeUnit)
An overloaded form of Map.put(Object, Object), which takes in lifespan parameters. |
void |
putAll(Map<? extends K,? extends V> t)
|
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 maxIdleTimeUnit)
An overloaded form of Map.putAll(java.util.Map), which takes in lifespan parameters. |
void |
putForExternalRead(K key,
V value)
Under special operating behavior, associates the value with the specified key. |
V |
putIfAbsent(K key,
V value)
|
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 maxIdleTimeUnit)
An overloaded form of ConcurrentMap.putIfAbsent(Object, Object), which takes in lifespan parameters. |
V |
remove(Object key)
|
boolean |
remove(Object key,
Object value)
|
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 maxIdleTimeUnit)
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 maxIdleTimeUnit)
An overloaded form of ConcurrentMap.replace(Object, Object, Object), which takes in lifespan parameters. |
int |
size()
|
void |
start()
|
boolean |
startBatch()
|
void |
stop()
|
Collection<V> |
values()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.util.Map |
|---|
equals, hashCode |
| Constructor Detail |
|---|
public AbstractDelegatingCache(Cache<K,V> cache)
| Method Detail |
|---|
public void putForExternalRead(K key,
V value)
CacheConcurrentMap.putIfAbsent(Object,
Object))
putForExternalRead in interface Cache<K,V>key - key with which the specified value is to be associated.value - value to be associated with the specified key.public void evict(K key)
evict in interface Cache<K,V>public Configuration getConfiguration()
getConfiguration in interface Cache<K,V>public boolean startBatch()
startBatch in interface Cache<K,V>public void endBatch(boolean successful)
endBatch in interface Cache<K,V>public String getName()
getName in interface Cache<K,V>public String getVersion()
getVersion in interface Cache<K,V>public CacheManager getCacheManager()
Cache
getCacheManager in interface Cache<K,V>
public V put(K key,
V value,
long lifespan,
TimeUnit unit)
CacheMap.put(Object, Object), which takes in lifespan parameters.
put in interface Cache<K,V>key - key to usevalue - value to storelifespan - lifespan of the entry. Negative values are intepreted as unlimited lifespan.unit - unit of measurement for the lifespan
public V putIfAbsent(K key,
V value,
long lifespan,
TimeUnit unit)
CacheConcurrentMap.putIfAbsent(Object, Object), which takes in lifespan parameters.
putIfAbsent in interface Cache<K,V>key - key to usevalue - value to storelifespan - lifespan of the entry. Negative values are intepreted as unlimited lifespan.unit - unit of measurement for the lifespan
public void putAll(Map<? extends K,? extends V> map,
long lifespan,
TimeUnit unit)
CacheMap.putAll(java.util.Map), which takes in lifespan parameters. Note that the lifespan
is applied to all mappings in the map passed in.
putAll in interface Cache<K,V>map - map containing mappings to enterlifespan - lifespan of the entry. Negative values are intepreted as unlimited lifespan.unit - unit of measurement for the lifespan
public V replace(K key,
V value,
long lifespan,
TimeUnit unit)
CacheConcurrentMap.replace(Object, Object), which takes in lifespan parameters.
replace in interface Cache<K,V>key - key to usevalue - value to storelifespan - lifespan of the entry. Negative values are intepreted as unlimited lifespan.unit - unit of measurement for the lifespan
public boolean replace(K key,
V oldValue,
V value,
long lifespan,
TimeUnit unit)
CacheConcurrentMap.replace(Object, Object, Object), which takes in lifespan parameters.
replace in interface Cache<K,V>key - key to useoldValue - value to replacevalue - value to storelifespan - lifespan of the entry. Negative values are intepreted as unlimited lifespan.unit - unit of measurement for the lifespan
public V put(K key,
V value,
long lifespan,
TimeUnit lifespanUnit,
long maxIdleTime,
TimeUnit maxIdleTimeUnit)
CacheMap.put(Object, Object), which takes in lifespan parameters.
put in interface Cache<K,V>key - key to usevalue - value to storelifespan - lifespan of the entry. Negative values are intepreted as unlimited lifespan.lifespanUnit - time unit for lifespanmaxIdleTime - the maximum amount of time this key is allowed to be idle for before it is considered as
expiredmaxIdleTimeUnit - time unit for max idle time
public V putIfAbsent(K key,
V value,
long lifespan,
TimeUnit lifespanUnit,
long maxIdleTime,
TimeUnit maxIdleTimeUnit)
CacheConcurrentMap.putIfAbsent(Object, Object), which takes in lifespan parameters.
putIfAbsent in interface Cache<K,V>key - key to usevalue - value to storelifespan - lifespan of the entry. Negative values are intepreted as unlimited lifespan.lifespanUnit - time unit for lifespanmaxIdleTime - the maximum amount of time this key is allowed to be idle for before it is considered as
expiredmaxIdleTimeUnit - time unit for max idle time
public void putAll(Map<? extends K,? extends V> map,
long lifespan,
TimeUnit lifespanUnit,
long maxIdleTime,
TimeUnit maxIdleTimeUnit)
CacheMap.putAll(java.util.Map), which takes in lifespan parameters. Note that the lifespan
is applied to all mappings in the map passed in.
putAll in interface Cache<K,V>map - map containing mappings to enterlifespan - lifespan of the entry. Negative values are intepreted as unlimited lifespan.lifespanUnit - time unit for lifespanmaxIdleTime - the maximum amount of time this key is allowed to be idle for before it is considered as
expiredmaxIdleTimeUnit - time unit for max idle time
public V replace(K key,
V value,
long lifespan,
TimeUnit lifespanUnit,
long maxIdleTime,
TimeUnit maxIdleTimeUnit)
CacheConcurrentMap.replace(Object, Object), which takes in lifespan parameters.
replace in interface Cache<K,V>key - key to usevalue - value to storelifespan - lifespan of the entry. Negative values are intepreted as unlimited lifespan.lifespanUnit - time unit for lifespanmaxIdleTime - the maximum amount of time this key is allowed to be idle for before it is considered as
expiredmaxIdleTimeUnit - time unit for max idle time
public boolean replace(K key,
V oldValue,
V value,
long lifespan,
TimeUnit lifespanUnit,
long maxIdleTime,
TimeUnit maxIdleTimeUnit)
CacheConcurrentMap.replace(Object, Object, Object), which takes in lifespan parameters.
replace in interface Cache<K,V>key - key to useoldValue - value to replacevalue - value to storelifespan - lifespan of the entry. Negative values are intepreted as unlimited lifespan.lifespanUnit - time unit for lifespanmaxIdleTime - the maximum amount of time this key is allowed to be idle for before it is considered as
expiredmaxIdleTimeUnit - time unit for max idle time
public AdvancedCache<K,V> getAdvancedCache()
getAdvancedCache in interface Cache<K,V>public void compact()
Cache
compact in interface Cache<K,V>public ComponentStatus getStatus()
getStatus in interface Cache<K,V>
public V putIfAbsent(K key,
V value)
putIfAbsent in interface ConcurrentMap<K,V>
public boolean remove(Object key,
Object value)
remove in interface ConcurrentMap<K,V>
public boolean replace(K key,
V oldValue,
V newValue)
replace in interface ConcurrentMap<K,V>
public V replace(K key,
V value)
replace in interface ConcurrentMap<K,V>public int size()
size in interface Map<K,V>public boolean isEmpty()
isEmpty in interface Map<K,V>public boolean containsKey(Object key)
containsKey in interface Map<K,V>public boolean containsValue(Object value)
containsValue in interface Map<K,V>public V get(Object key)
get in interface Map<K,V>
public V put(K key,
V value)
put in interface Map<K,V>public V remove(Object key)
remove in interface Map<K,V>public void putAll(Map<? extends K,? extends V> t)
putAll in interface Map<K,V>public void clear()
clear in interface Map<K,V>public Set<K> keySet()
keySet in interface Map<K,V>public Set<Map.Entry<K,V>> entrySet()
entrySet in interface Map<K,V>public Collection<V> values()
values in interface Map<K,V>public void start()
start in interface Lifecyclepublic void stop()
stop in interface Lifecyclepublic void addListener(Object listener)
ListenableListener and
further to that, contain methods annotated appropriately, otherwise the listener will not be registered.
See the Listener annotation for more information.
addListener in interface Listenablelistener - must not be null.public void removeListener(Object listener)
Listenable
removeListener in interface Listenablelistener - listener to remove. Must not be null.public Set<Object> getListeners()
getListeners in interface Listenable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||