|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.infinispan.tree.CacheAdapter
public class CacheAdapter
A cache adapter for setting flags for each individual cache operation called within the scope of a TreeCache operation. Note: We can't just wrap around use of cache in tree module because flag assignment needs to extend even to calls within AtomicHashMapProxy.getDeltaMapForWrite(). So, the only possible way is to wrap around the Cache instance around something that sets flags accordingly.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface java.util.Map |
---|
Map.Entry<K,V> |
Constructor Summary | |
---|---|
CacheAdapter(Cache cache,
TreeContextContainer tcc,
InvocationContextContainer icc)
|
Method Summary | |
---|---|
void |
addListener(Object listener)
Adds a listener to the component. |
void |
clear()
|
NotifyingFuture<Void> |
clearAsync()
Asynchronous version of Map.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)
Completes a batch if one has been started using Cache.startBatch() . |
Set |
entrySet()
Returns a set view of the mappings contained in this cache. |
void |
evict(Object key)
Evicts an entry from the memory of the cache. |
Object |
get(Object key)
|
AdvancedCache |
getAdvancedCache()
|
NotifyingFuture |
getAsync(Object key)
Asynchronous version of Map.get(Object) that allows user code to
retrieve the value associated with a key at a later stage, hence allowing
multiple parallel get requests to be sent. |
EmbeddedCacheManager |
getCacheManager()
Retrieves the cache manager responsible for creating this cache instance. |
Configuration |
getConfiguration()
|
Set<Object> |
getListeners()
|
String |
getName()
Retrieves the name of the cache |
ComponentStatus |
getStatus()
|
String |
getVersion()
Retrieves the version of Infinispan |
boolean |
isEmpty()
|
Set |
keySet()
Returns a set view of the keys contained in this cache. |
Object |
put(Object key,
Object value)
|
Object |
put(Object key,
Object value,
long lifespan,
TimeUnit unit)
An overloaded form of Map.put(Object, Object) , which takes in lifespan parameters. |
Object |
put(Object key,
Object 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 m)
|
void |
putAll(Map map,
long lifespan,
TimeUnit unit)
An overloaded form of Map.putAll(Map) , which takes in lifespan parameters. |
void |
putAll(Map map,
long lifespan,
TimeUnit lifespanUnit,
long maxIdleTime,
TimeUnit maxIdleTimeUnit)
An overloaded form of Map.putAll(Map) , which takes in lifespan parameters. |
NotifyingFuture<Void> |
putAllAsync(Map data)
Asynchronous version of Map.putAll(Map) . |
NotifyingFuture<Void> |
putAllAsync(Map data,
long lifespan,
TimeUnit unit)
Asynchronous version of Cache.putAll(Map, long, TimeUnit) . |
NotifyingFuture<Void> |
putAllAsync(Map data,
long lifespan,
TimeUnit lifespanUnit,
long maxIdle,
TimeUnit maxIdleUnit)
Asynchronous version of Cache.putAll(Map, long, TimeUnit, long, TimeUnit) . |
NotifyingFuture |
putAsync(Object key,
Object value)
Asynchronous version of Map.put(Object, Object) . |
NotifyingFuture |
putAsync(Object key,
Object value,
long lifespan,
TimeUnit unit)
Asynchronous version of Cache.put(Object, Object, long, TimeUnit) . |
NotifyingFuture |
putAsync(Object key,
Object value,
long lifespan,
TimeUnit lifespanUnit,
long maxIdle,
TimeUnit maxIdleUnit)
Asynchronous version of Cache.put(Object, Object, long, TimeUnit, long, TimeUnit) . |
void |
putForExternalRead(Object key,
Object value)
Under special operating behavior, associates the value with the specified key. |
Object |
putIfAbsent(Object key,
Object value)
|
Object |
putIfAbsent(Object key,
Object value,
long lifespan,
TimeUnit unit)
An overloaded form of ConcurrentMap.putIfAbsent(Object, Object) , which takes in lifespan parameters. |
Object |
putIfAbsent(Object key,
Object value,
long lifespan,
TimeUnit lifespanUnit,
long maxIdleTime,
TimeUnit maxIdleTimeUnit)
An overloaded form of ConcurrentMap.putIfAbsent(Object, Object) , which takes in lifespan parameters. |
NotifyingFuture |
putIfAbsentAsync(Object key,
Object value)
Asynchronous version of ConcurrentMap.putIfAbsent(Object, Object) . |
NotifyingFuture |
putIfAbsentAsync(Object key,
Object value,
long lifespan,
TimeUnit unit)
Asynchronous version of Cache.putIfAbsent(Object, Object, long, TimeUnit) . |
NotifyingFuture |
putIfAbsentAsync(Object key,
Object value,
long lifespan,
TimeUnit lifespanUnit,
long maxIdle,
TimeUnit maxIdleUnit)
Asynchronous version of Cache.putIfAbsent(Object, Object, long, TimeUnit, long, TimeUnit) . |
Object |
remove(Object key)
|
boolean |
remove(Object key,
Object value)
|
NotifyingFuture |
removeAsync(Object key)
Asynchronous version of Map.remove(Object) . |
NotifyingFuture<Boolean> |
removeAsync(Object key,
Object value)
Asynchronous version of ConcurrentMap.remove(Object, Object) . |
void |
removeListener(Object listener)
Removes a listener from the component. |
Object |
replace(Object key,
Object value)
|
Object |
replace(Object key,
Object value,
long lifespan,
TimeUnit unit)
An overloaded form of ConcurrentMap.replace(Object, Object) , which takes in lifespan parameters. |
Object |
replace(Object key,
Object value,
long lifespan,
TimeUnit lifespanUnit,
long maxIdleTime,
TimeUnit maxIdleTimeUnit)
An overloaded form of ConcurrentMap.replace(Object, Object) , which takes in lifespan parameters. |
boolean |
replace(Object key,
Object oldValue,
Object newValue)
|
boolean |
replace(Object key,
Object oldValue,
Object value,
long lifespan,
TimeUnit unit)
An overloaded form of ConcurrentMap.replace(Object, Object, Object) , which takes in lifespan parameters. |
boolean |
replace(Object key,
Object oldValue,
Object value,
long lifespan,
TimeUnit lifespanUnit,
long maxIdleTime,
TimeUnit maxIdleTimeUnit)
An overloaded form of ConcurrentMap.replace(Object, Object, Object) , which takes in lifespan parameters. |
NotifyingFuture |
replaceAsync(Object key,
Object value)
Asynchronous version of ConcurrentMap.replace(Object, Object) . |
NotifyingFuture |
replaceAsync(Object key,
Object value,
long lifespan,
TimeUnit unit)
Asynchronous version of Cache.replace(Object, Object, long, TimeUnit) . |
NotifyingFuture |
replaceAsync(Object key,
Object value,
long lifespan,
TimeUnit lifespanUnit,
long maxIdle,
TimeUnit maxIdleUnit)
Asynchronous version of Cache.replace(Object, Object, long, TimeUnit, long, TimeUnit) . |
NotifyingFuture<Boolean> |
replaceAsync(Object key,
Object oldValue,
Object newValue)
Asynchronous version of ConcurrentMap.replace(Object, Object, Object) . |
NotifyingFuture<Boolean> |
replaceAsync(Object key,
Object oldValue,
Object newValue,
long lifespan,
TimeUnit unit)
Asynchronous version of Cache.replace(Object, Object, Object, long, TimeUnit) . |
NotifyingFuture<Boolean> |
replaceAsync(Object key,
Object oldValue,
Object newValue,
long lifespan,
TimeUnit lifespanUnit,
long maxIdle,
TimeUnit maxIdleUnit)
Asynchronous version of Cache.replace(Object, Object, Object, long, TimeUnit, long, TimeUnit) . |
int |
size()
|
void |
start()
|
boolean |
startBatch()
Starts a batch. |
void |
stop()
|
Collection |
values()
Returns a collection view of the values contained in this cache. |
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 CacheAdapter(Cache cache, TreeContextContainer tcc, InvocationContextContainer icc)
Method Detail |
---|
public void putForExternalRead(Object key, Object value)
Cache
ConcurrentMap.putIfAbsent(Object, Object)
)
putForExternalRead
in interface Cache
key
- key with which the specified value is to be associated.value
- value to be associated with the specified key.public void evict(Object key)
Cache
Map.remove(Object)
to remove an
entry from the entire cache system.
This method is designed to evict an entry from memory to free up memory used by the application. This method uses
a 0 lock acquisition timeout so it does not block in attempting to acquire locks. It behaves as a no-op if the
lock on the entry cannot be acquired immediately.
Important: this method should not be called from within a transaction scope.
evict
in interface Cache
key
- key to evictpublic Configuration getConfiguration()
getConfiguration
in interface Cache
public boolean startBatch()
Cache
startBatch
in interface Cache
public void endBatch(boolean successful)
Cache
Cache.startBatch()
. If no batch has been started, this is a
no-op.
endBatch
in interface Cache
successful
- if true, the batch completes, otherwise the batch is aborted and changes are not committed.public String getName()
Cache
getName
in interface Cache
public String getVersion()
Cache
getVersion
in interface Cache
public EmbeddedCacheManager getCacheManager()
Cache
getCacheManager
in interface Cache
public Object put(Object key, Object value, long lifespan, TimeUnit unit)
Cache
Map.put(Object, Object)
, which takes in lifespan parameters.
put
in interface Cache
key
- key to usevalue
- value to storelifespan
- lifespan of the entry. Negative values are interpreted as unlimited lifespan.unit
- unit of measurement for the lifespan
public Object putIfAbsent(Object key, Object value, long lifespan, TimeUnit unit)
Cache
ConcurrentMap.putIfAbsent(Object, Object)
, which takes in lifespan parameters.
putIfAbsent
in interface Cache
key
- key to usevalue
- value to storelifespan
- lifespan of the entry. Negative values are interpreted as unlimited lifespan.unit
- unit of measurement for the lifespan
public void putAll(Map map, long lifespan, TimeUnit unit)
Cache
Map.putAll(Map)
, which takes in lifespan parameters. Note that the lifespan is applied
to all mappings in the map passed in.
putAll
in interface Cache
map
- map containing mappings to enterlifespan
- lifespan of the entry. Negative values are interpreted as unlimited lifespan.unit
- unit of measurement for the lifespanpublic Object replace(Object key, Object value, long lifespan, TimeUnit unit)
Cache
ConcurrentMap.replace(Object, Object)
, which takes in lifespan parameters.
replace
in interface Cache
key
- key to usevalue
- value to storelifespan
- lifespan of the entry. Negative values are interpreted as unlimited lifespan.unit
- unit of measurement for the lifespan
public boolean replace(Object key, Object oldValue, Object value, long lifespan, TimeUnit unit)
Cache
ConcurrentMap.replace(Object, Object, Object)
, which takes in lifespan parameters.
replace
in interface Cache
key
- key to useoldValue
- value to replacevalue
- value to storelifespan
- lifespan of the entry. Negative values are interpreted as unlimited lifespan.unit
- unit of measurement for the lifespan
public Object put(Object key, Object value, long lifespan, TimeUnit lifespanUnit, long maxIdleTime, TimeUnit maxIdleTimeUnit)
Cache
Map.put(Object, Object)
, which takes in lifespan parameters.
put
in interface Cache
key
- key to usevalue
- value to storelifespan
- lifespan of the entry. Negative values are interpreted 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 Object putIfAbsent(Object key, Object value, long lifespan, TimeUnit lifespanUnit, long maxIdleTime, TimeUnit maxIdleTimeUnit)
Cache
ConcurrentMap.putIfAbsent(Object, Object)
, which takes in lifespan parameters.
putIfAbsent
in interface Cache
key
- key to usevalue
- value to storelifespan
- lifespan of the entry. Negative values are interpreted 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 map, long lifespan, TimeUnit lifespanUnit, long maxIdleTime, TimeUnit maxIdleTimeUnit)
Cache
Map.putAll(Map)
, which takes in lifespan parameters. Note that the lifespan is applied
to all mappings in the map passed in.
putAll
in interface Cache
map
- map containing mappings to enterlifespan
- lifespan of the entry. Negative values are interpreted 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 timepublic Object replace(Object key, Object value, long lifespan, TimeUnit lifespanUnit, long maxIdleTime, TimeUnit maxIdleTimeUnit)
Cache
ConcurrentMap.replace(Object, Object)
, which takes in lifespan parameters.
replace
in interface Cache
key
- key to usevalue
- value to storelifespan
- lifespan of the entry. Negative values are interpreted 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(Object key, Object oldValue, Object value, long lifespan, TimeUnit lifespanUnit, long maxIdleTime, TimeUnit maxIdleTimeUnit)
Cache
ConcurrentMap.replace(Object, Object, Object)
, which takes in lifespan parameters.
replace
in interface Cache
key
- key to useoldValue
- value to replacevalue
- value to storelifespan
- lifespan of the entry. Negative values are interpreted 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 NotifyingFuture putAsync(Object key, Object value)
Cache
Map.put(Object, Object)
. This method does not block on remote calls, even if your
cache mode is synchronous. Has no benefit over Map.put(Object, Object)
if used in LOCAL mode.
putAsync
in interface Cache
key
- key to usevalue
- value to store
public NotifyingFuture putAsync(Object key, Object value, long lifespan, TimeUnit unit)
Cache
Cache.put(Object, Object, long, TimeUnit)
. This method does not block on remote
calls, even if your cache mode is synchronous. Has no benefit over Cache.put(Object, Object, long, TimeUnit)
if used in LOCAL mode.
putAsync
in interface Cache
key
- key to usevalue
- value to storelifespan
- lifespan of entryunit
- time unit for lifespan
public NotifyingFuture putAsync(Object key, Object value, long lifespan, TimeUnit lifespanUnit, long maxIdle, TimeUnit maxIdleUnit)
Cache
Cache.put(Object, Object, long, TimeUnit, long, TimeUnit)
. This method does not block
on remote calls, even if your cache mode is synchronous. Has no benefit over Cache.put(Object, Object, long,
TimeUnit, long, TimeUnit)
if used in LOCAL mode.
putAsync
in interface Cache
key
- key to usevalue
- value to storelifespan
- lifespan of entrylifespanUnit
- time unit for lifespanmaxIdle
- the maximum amount of time this key is allowed to be idle for before it is considered as
expiredmaxIdleUnit
- time unit for max idle time
public NotifyingFuture<Void> putAllAsync(Map data)
Cache
Map.putAll(Map)
. This method does not block on remote calls, even if your cache mode
is synchronous. Has no benefit over Map.putAll(Map)
if used in LOCAL mode.
putAllAsync
in interface Cache
data
- to store
public NotifyingFuture<Void> putAllAsync(Map data, long lifespan, TimeUnit unit)
Cache
Cache.putAll(Map, long, TimeUnit)
. This method does not block on remote calls, even if
your cache mode is synchronous. Has no benefit over Cache.putAll(Map, long, TimeUnit)
if used in LOCAL mode.
putAllAsync
in interface Cache
data
- to storelifespan
- lifespan of entryunit
- time unit for lifespan
public NotifyingFuture<Void> putAllAsync(Map data, long lifespan, TimeUnit lifespanUnit, long maxIdle, TimeUnit maxIdleUnit)
Cache
Cache.putAll(Map, long, TimeUnit, long, TimeUnit)
. This method does not block on
remote calls, even if your cache mode is synchronous. Has no benefit over Cache.putAll(Map, long, TimeUnit,
long, TimeUnit)
if used in LOCAL mode.
putAllAsync
in interface Cache
data
- to storelifespan
- lifespan of entrylifespanUnit
- time unit for lifespanmaxIdle
- the maximum amount of time this key is allowed to be idle for before it is considered as
expiredmaxIdleUnit
- time unit for max idle time
public NotifyingFuture<Void> clearAsync()
Cache
Map.clear()
. This method does not block on remote calls, even if your cache mode is
synchronous. Has no benefit over Map.clear()
if used in LOCAL mode.
clearAsync
in interface Cache
public NotifyingFuture putIfAbsentAsync(Object key, Object value)
Cache
ConcurrentMap.putIfAbsent(Object, Object)
. This method does not block on remote calls, even if
your cache mode is synchronous. Has no benefit over ConcurrentMap.putIfAbsent(Object, Object)
if used in LOCAL mode.
putIfAbsentAsync
in interface Cache
key
- key to usevalue
- value to store
public NotifyingFuture putIfAbsentAsync(Object key, Object value, long lifespan, TimeUnit unit)
Cache
Cache.putIfAbsent(Object, Object, long, TimeUnit)
. This method does not block on
remote calls, even if your cache mode is synchronous. Has no benefit over Cache.putIfAbsent(Object, Object,
long, TimeUnit)
if used in LOCAL mode.
putIfAbsentAsync
in interface Cache
key
- key to usevalue
- value to storelifespan
- lifespan of entryunit
- time unit for lifespan
public NotifyingFuture putIfAbsentAsync(Object key, Object value, long lifespan, TimeUnit lifespanUnit, long maxIdle, TimeUnit maxIdleUnit)
Cache
Cache.putIfAbsent(Object, Object, long, TimeUnit, long, TimeUnit)
. This method does
not block on remote calls, even if your cache mode is synchronous. Has no benefit over Cache.putIfAbsent(Object, Object, long, TimeUnit, long, TimeUnit)
if used in LOCAL mode.
putIfAbsentAsync
in interface Cache
key
- key to usevalue
- value to storelifespan
- lifespan of entrylifespanUnit
- time unit for lifespanmaxIdle
- the maximum amount of time this key is allowed to be idle for before it is considered as
expiredmaxIdleUnit
- time unit for max idle time
public NotifyingFuture removeAsync(Object key)
Cache
Map.remove(Object)
. This method does not block on remote calls, even if your cache
mode is synchronous. Has no benefit over Map.remove(Object)
if used in LOCAL mode.
removeAsync
in interface Cache
key
- key to remove
public NotifyingFuture<Boolean> removeAsync(Object key, Object value)
Cache
ConcurrentMap.remove(Object, Object)
. This method does not block on remote calls, even if your
cache mode is synchronous. Has no benefit over ConcurrentMap.remove(Object, Object)
if used in LOCAL mode.
removeAsync
in interface Cache
key
- key to removevalue
- value to match on
public NotifyingFuture replaceAsync(Object key, Object value)
Cache
ConcurrentMap.replace(Object, Object)
. This method does not block on remote calls, even if
your cache mode is synchronous. Has no benefit over ConcurrentMap.replace(Object, Object)
if used in LOCAL mode.
replaceAsync
in interface Cache
key
- key to removevalue
- value to store
public NotifyingFuture replaceAsync(Object key, Object value, long lifespan, TimeUnit unit)
Cache
Cache.replace(Object, Object, long, TimeUnit)
. This method does not block on remote
calls, even if your cache mode is synchronous. Has no benefit over Cache.replace(Object, Object, long,
TimeUnit)
if used in LOCAL mode.
replaceAsync
in interface Cache
key
- key to removevalue
- value to storelifespan
- lifespan of entryunit
- time unit for lifespan
public NotifyingFuture replaceAsync(Object key, Object value, long lifespan, TimeUnit lifespanUnit, long maxIdle, TimeUnit maxIdleUnit)
Cache
Cache.replace(Object, Object, long, TimeUnit, long, TimeUnit)
. This method does not
block on remote calls, even if your cache mode is synchronous. Has no benefit over Cache.replace(Object,
Object, long, TimeUnit, long, TimeUnit)
if used in LOCAL mode.
replaceAsync
in interface Cache
key
- key to removevalue
- value to storelifespan
- lifespan of entrylifespanUnit
- time unit for lifespanmaxIdle
- the maximum amount of time this key is allowed to be idle for before it is considered as
expiredmaxIdleUnit
- time unit for max idle time
public NotifyingFuture<Boolean> replaceAsync(Object key, Object oldValue, Object newValue)
Cache
ConcurrentMap.replace(Object, Object, Object)
. This method does not block on remote calls,
even if your cache mode is synchronous. Has no benefit over ConcurrentMap.replace(Object, Object, Object)
if used in
LOCAL mode.
replaceAsync
in interface Cache
key
- key to removeoldValue
- value to overwritenewValue
- value to store
public NotifyingFuture<Boolean> replaceAsync(Object key, Object oldValue, Object newValue, long lifespan, TimeUnit unit)
Cache
Cache.replace(Object, Object, Object, long, TimeUnit)
. This method does not block on
remote calls, even if your cache mode is synchronous. Has no benefit over Cache.replace(Object, Object, Object,
long, TimeUnit)
if used in LOCAL mode.
replaceAsync
in interface Cache
key
- key to removeoldValue
- value to overwritenewValue
- value to storelifespan
- lifespan of entryunit
- time unit for lifespan
public NotifyingFuture<Boolean> replaceAsync(Object key, Object oldValue, Object newValue, long lifespan, TimeUnit lifespanUnit, long maxIdle, TimeUnit maxIdleUnit)
Cache
Cache.replace(Object, Object, Object, long, TimeUnit, long, TimeUnit)
. This method
does not block on remote calls, even if your cache mode is synchronous. Has no benefit over Cache.replace(Object, Object, Object, long, TimeUnit, long, TimeUnit)
if used in LOCAL mode.
replaceAsync
in interface Cache
key
- key to removeoldValue
- value to overwritenewValue
- value to storelifespan
- lifespan of entrylifespanUnit
- time unit for lifespanmaxIdle
- the maximum amount of time this key is allowed to be idle for before it is considered as
expiredmaxIdleUnit
- time unit for max idle time
public AdvancedCache getAdvancedCache()
getAdvancedCache
in interface Cache
public void compact()
Cache
compact
in interface Cache
public ComponentStatus getStatus()
getStatus
in interface Cache
public int size()
size
in interface Map
public boolean isEmpty()
isEmpty
in interface Map
public boolean containsKey(Object key)
containsKey
in interface Map
public boolean containsValue(Object value)
containsValue
in interface Map
public Object get(Object key)
get
in interface Map
public Object put(Object key, Object value)
put
in interface Map
public Object remove(Object key)
remove
in interface Map
public void putAll(Map m)
putAll
in interface Map
public void clear()
clear
in interface Map
public Set keySet()
Cache
keySet
in interface Map
keySet
in interface Cache
public Collection values()
Cache
values
in interface Map
values
in interface Cache
public Set entrySet()
Cache
Map.Entry
. When this method is called on a cache configured with distribution mode, the set returned only
contains the mappings locally available in the cache instance. To avoid memory issues, there will be not attempt
to bring mappings from other nodes.
This method should only be used for debugging purposes such as to verify that the cache contains all the mappings
entered. Any other use involving execution of this method on a production system is not recommended.
entrySet
in interface Map
entrySet
in interface Cache
public Object putIfAbsent(Object key, Object value)
putIfAbsent
in interface ConcurrentMap
public boolean remove(Object key, Object value)
remove
in interface ConcurrentMap
public boolean replace(Object key, Object oldValue, Object newValue)
replace
in interface ConcurrentMap
public Object replace(Object key, Object value)
replace
in interface ConcurrentMap
public void start()
start
in interface Lifecycle
public void stop()
stop
in interface Lifecycle
public void addListener(Object listener)
Listenable
Listener
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 Listenable
listener
- must not be null.public void removeListener(Object listener)
Listenable
removeListener
in interface Listenable
listener
- listener to remove. Must not be null.public Set<Object> getListeners()
getListeners
in interface Listenable
public NotifyingFuture getAsync(Object key)
Cache
Map.get(Object)
that allows user code to
retrieve the value associated with a key at a later stage, hence allowing
multiple parallel get requests to be sent. Normally, when this method
detects that the value is likely to be retrieved from from a remote
entity, it will span a different thread in order to allow the
asynchronous get call to return immediately. If the call will definitely
resolve locally, for example when the cache is configured with LOCAL mode
and no cache loaders are configured, the get asynchronous call will act
sequentially and will have no different to Map.get(Object)
.
getAsync
in interface Cache
key
- key to retrieve
Map.get(Object)
|
--> | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |