|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.infinispan.CacheSupport<K,V>
public abstract class CacheSupport<K,V>
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface java.util.Map |
---|
Map.Entry<K,V> |
Field Summary | |
---|---|
protected long |
defaultLifespan
|
protected long |
defaultMaxIdleTime
|
Constructor Summary | |
---|---|
protected |
CacheSupport()
|
protected |
CacheSupport(long defaultLifespan,
long defaultMaxIdleTime)
|
Method Summary | |
---|---|
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. |
void |
putAll(Map<? extends K,? extends V> map)
|
void |
putAll(Map<? extends K,? extends V> map,
long lifespan,
TimeUnit unit)
An overloaded form of Map.putAll(Map) , which takes in lifespan parameters. |
NotifyingFuture<Void> |
putAllAsync(Map<? extends K,? extends V> data)
Asynchronous version of Map.putAll(Map) . |
NotifyingFuture<Void> |
putAllAsync(Map<? extends K,? extends V> data,
long lifespan,
TimeUnit unit)
Asynchronous version of BasicCache.putAll(Map, long, TimeUnit) . |
NotifyingFuture<V> |
putAsync(K key,
V value)
Asynchronous version of Map.put(Object, Object) . |
NotifyingFuture<V> |
putAsync(K key,
V value,
long lifespan,
TimeUnit unit)
Asynchronous version of BasicCache.put(Object, Object, long, TimeUnit) . |
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. |
NotifyingFuture<V> |
putIfAbsentAsync(K key,
V value)
Asynchronous version of ConcurrentMap.putIfAbsent(Object, Object) . |
NotifyingFuture<V> |
putIfAbsentAsync(K key,
V value,
long lifespan,
TimeUnit unit)
Asynchronous version of BasicCache.putIfAbsent(Object, Object, long, TimeUnit) . |
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. |
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. |
NotifyingFuture<V> |
replaceAsync(K key,
V value)
Asynchronous version of ConcurrentMap.replace(Object, Object) . |
NotifyingFuture<V> |
replaceAsync(K key,
V value,
long lifespan,
TimeUnit unit)
Asynchronous version of BasicCache.replace(Object, Object, long, TimeUnit) . |
NotifyingFuture<Boolean> |
replaceAsync(K key,
V oldValue,
V newValue)
Asynchronous version of ConcurrentMap.replace(Object, Object, Object) . |
NotifyingFuture<Boolean> |
replaceAsync(K key,
V oldValue,
V newValue,
long lifespan,
TimeUnit unit)
Asynchronous version of BasicCache.replace(Object, Object, Object, long, TimeUnit) . |
protected abstract void |
set(K key,
V value)
This is intentionally a non-public method meant as an integration point for bytecode manipulation. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.infinispan.api.BasicCache |
---|
clearAsync, getAsync, getName, getVersion, put, putAll, putAllAsync, putAsync, putIfAbsent, putIfAbsentAsync, removeAsync, removeAsync, replace, replace, replaceAsync, replaceAsync |
Methods inherited from interface java.util.concurrent.ConcurrentMap |
---|
remove |
Methods inherited from interface java.util.Map |
---|
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, remove, size, values |
Methods inherited from interface org.infinispan.lifecycle.Lifecycle |
---|
start, stop |
Field Detail |
---|
protected long defaultLifespan
protected long defaultMaxIdleTime
Constructor Detail |
---|
protected CacheSupport()
protected CacheSupport(long defaultLifespan, long defaultMaxIdleTime)
Method Detail |
---|
public final V put(K key, V value)
put
in interface Map<K,V>
protected abstract void set(K key, V value)
public final void putAll(Map<? extends K,? extends V> map)
putAll
in interface Map<K,V>
public final NotifyingFuture<V> putAsync(K key, V value)
BasicCache
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 BasicCache<K,V>
key
- key to usevalue
- value to store
public final V putIfAbsent(K key, V value)
putIfAbsent
in interface ConcurrentMap<K,V>
public final NotifyingFuture<V> putAsync(K key, V value, long lifespan, TimeUnit unit)
BasicCache
BasicCache.put(Object, Object, long, TimeUnit)
. This method does not block on remote
calls, even if your cache mode is synchronous. Has no benefit over BasicCache.put(Object, Object, long, TimeUnit)
if used in LOCAL mode.
putAsync
in interface BasicCache<K,V>
key
- key to usevalue
- value to storelifespan
- lifespan of entryunit
- time unit for lifespan
public final NotifyingFuture<Void> putAllAsync(Map<? extends K,? extends V> data)
BasicCache
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 BasicCache<K,V>
data
- to store
public final NotifyingFuture<Void> putAllAsync(Map<? extends K,? extends V> data, long lifespan, TimeUnit unit)
BasicCache
BasicCache.putAll(Map, long, TimeUnit)
. This method does not block on remote calls, even if
your cache mode is synchronous. Has no benefit over BasicCache.putAll(Map, long, TimeUnit)
if used in LOCAL mode.
putAllAsync
in interface BasicCache<K,V>
data
- to storelifespan
- lifespan of entryunit
- time unit for lifespan
public final NotifyingFuture<V> putIfAbsentAsync(K key, V value)
BasicCache
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 BasicCache<K,V>
key
- key to usevalue
- value to store
public final NotifyingFuture<V> putIfAbsentAsync(K key, V value, long lifespan, TimeUnit unit)
BasicCache
BasicCache.putIfAbsent(Object, Object, long, TimeUnit)
. This method does not block on
remote calls, even if your cache mode is synchronous. Has no benefit over BasicCache.putIfAbsent(Object, Object,
long, TimeUnit)
if used in LOCAL mode.
putIfAbsentAsync
in interface BasicCache<K,V>
key
- key to usevalue
- value to storelifespan
- lifespan of entryunit
- time unit for lifespan
public final NotifyingFuture<V> replaceAsync(K key, V value, long lifespan, TimeUnit unit)
BasicCache
BasicCache.replace(Object, Object, long, TimeUnit)
. This method does not block on remote
calls, even if your cache mode is synchronous. Has no benefit over BasicCache.replace(Object, Object, long,
TimeUnit)
if used in LOCAL mode.
replaceAsync
in interface BasicCache<K,V>
key
- key to removevalue
- value to storelifespan
- lifespan of entryunit
- time unit for lifespan
public final NotifyingFuture<Boolean> replaceAsync(K key, V oldValue, V newValue)
BasicCache
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 BasicCache<K,V>
key
- key to removeoldValue
- value to overwritenewValue
- value to store
public final NotifyingFuture<V> replaceAsync(K key, V value)
BasicCache
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 BasicCache<K,V>
key
- key to removevalue
- value to store
public final NotifyingFuture<Boolean> replaceAsync(K key, V oldValue, V newValue, long lifespan, TimeUnit unit)
BasicCache
BasicCache.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 BasicCache.replace(Object, Object, Object,
long, TimeUnit)
if used in LOCAL mode.
replaceAsync
in interface BasicCache<K,V>
key
- key to removeoldValue
- value to overwritenewValue
- value to storelifespan
- lifespan of entryunit
- time unit for lifespan
public final V put(K key, V value, long lifespan, TimeUnit unit)
BasicCache
Map.put(Object, Object)
, which takes in lifespan parameters.
put
in interface BasicCache<K,V>
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 final V putIfAbsent(K key, V value, long lifespan, TimeUnit unit)
BasicCache
ConcurrentMap.putIfAbsent(Object, Object)
, which takes in lifespan parameters.
putIfAbsent
in interface BasicCache<K,V>
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 final void putAll(Map<? extends K,? extends V> map, long lifespan, TimeUnit unit)
BasicCache
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 BasicCache<K,V>
map
- map containing mappings to enterlifespan
- lifespan of the entry. Negative values are interpreted as unlimited lifespan.unit
- unit of measurement for the lifespanpublic final V replace(K key, V value, long lifespan, TimeUnit unit)
BasicCache
ConcurrentMap.replace(Object, Object)
, which takes in lifespan parameters.
replace
in interface BasicCache<K,V>
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 final boolean replace(K key, V oldValue, V newValue)
replace
in interface ConcurrentMap<K,V>
public final V replace(K key, V value)
replace
in interface ConcurrentMap<K,V>
public final boolean replace(K key, V oldValue, V value, long lifespan, TimeUnit unit)
BasicCache
ConcurrentMap.replace(Object, Object, Object)
, which takes in lifespan parameters.
replace
in interface BasicCache<K,V>
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
|
--> | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |