public abstract class CacheSupport<K,V>
extends java.lang.Object
implements org.infinispan.api.BasicCache<K,V>
Modifier and Type | Field and Description |
---|---|
protected long |
defaultLifespan |
protected long |
defaultMaxIdleTime |
Modifier | Constructor and Description |
---|---|
protected |
CacheSupport() |
protected |
CacheSupport(long defaultLifespan,
long defaultMaxIdleTime) |
Modifier and Type | Method and Description |
---|---|
V |
put(K key,
V value) |
V |
put(K key,
V value,
long lifespan,
java.util.concurrent.TimeUnit unit) |
void |
putAll(java.util.Map<? extends K,? extends V> map) |
void |
putAll(java.util.Map<? extends K,? extends V> map,
long lifespan,
java.util.concurrent.TimeUnit unit) |
org.infinispan.util.concurrent.NotifyingFuture<java.lang.Void> |
putAllAsync(java.util.Map<? extends K,? extends V> data)
Asynchronous version of
#putAll(Map) . |
org.infinispan.util.concurrent.NotifyingFuture<java.lang.Void> |
putAllAsync(java.util.Map<? extends K,? extends V> data,
long lifespan,
java.util.concurrent.TimeUnit unit)
Asynchronous version of
#putAll(Map, long, TimeUnit) . |
org.infinispan.util.concurrent.NotifyingFuture<V> |
putAsync(K key,
V value)
Asynchronous version of
#put(Object, Object) . |
org.infinispan.util.concurrent.NotifyingFuture<V> |
putAsync(K key,
V value,
long lifespan,
java.util.concurrent.TimeUnit unit)
Asynchronous version of
#put(Object, Object, long, TimeUnit) . |
V |
putIfAbsent(K key,
V value) |
V |
putIfAbsent(K key,
V value,
long lifespan,
java.util.concurrent.TimeUnit unit) |
org.infinispan.util.concurrent.NotifyingFuture<V> |
putIfAbsentAsync(K key,
V value)
Asynchronous version of
#putIfAbsent(Object, Object) . |
org.infinispan.util.concurrent.NotifyingFuture<V> |
putIfAbsentAsync(K key,
V value,
long lifespan,
java.util.concurrent.TimeUnit unit)
Asynchronous version of
#putIfAbsent(Object, Object, long, TimeUnit) . |
V |
replace(K key,
V value) |
V |
replace(K key,
V value,
long lifespan,
java.util.concurrent.TimeUnit unit) |
boolean |
replace(K key,
V oldValue,
V newValue) |
boolean |
replace(K key,
V oldValue,
V value,
long lifespan,
java.util.concurrent.TimeUnit unit) |
org.infinispan.util.concurrent.NotifyingFuture<V> |
replaceAsync(K key,
V value)
Asynchronous version of
#replace(Object, Object) . |
org.infinispan.util.concurrent.NotifyingFuture<V> |
replaceAsync(K key,
V value,
long lifespan,
java.util.concurrent.TimeUnit unit)
Asynchronous version of
#replace(Object, Object, long, TimeUnit) . |
org.infinispan.util.concurrent.NotifyingFuture<java.lang.Boolean> |
replaceAsync(K key,
V oldValue,
V newValue)
Asynchronous version of
#replace(Object, Object, Object) . |
org.infinispan.util.concurrent.NotifyingFuture<java.lang.Boolean> |
replaceAsync(K key,
V oldValue,
V newValue,
long lifespan,
java.util.concurrent.TimeUnit unit)
Asynchronous version of
#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.
|
protected long defaultLifespan
protected long defaultMaxIdleTime
protected CacheSupport()
protected CacheSupport(long defaultLifespan, long defaultMaxIdleTime)
protected abstract void set(K key, V value)
public final org.infinispan.util.concurrent.NotifyingFuture<V> putAsync(K key, V value)
org.infinispan.api.BasicCache
#put(Object, Object)
. This method does not block on remote calls, even if your
cache mode is synchronous. Has no benefit over #put(Object, Object)
if used in LOCAL mode.
public final org.infinispan.util.concurrent.NotifyingFuture<V> putAsync(K key, V value, long lifespan, java.util.concurrent.TimeUnit unit)
org.infinispan.api.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 #put(Object, Object, long, TimeUnit)
if used in LOCAL mode.public final org.infinispan.util.concurrent.NotifyingFuture<java.lang.Void> putAllAsync(java.util.Map<? extends K,? extends V> data)
org.infinispan.api.BasicCache
#putAll(Map)
. This method does not block on remote calls, even if your cache mode
is synchronous. Has no benefit over #putAll(Map)
if used in LOCAL mode.public final org.infinispan.util.concurrent.NotifyingFuture<java.lang.Void> putAllAsync(java.util.Map<? extends K,? extends V> data, long lifespan, java.util.concurrent.TimeUnit unit)
org.infinispan.api.BasicCache
#putAll(Map, long, TimeUnit)
. This method does not block on remote calls, even if
your cache mode is synchronous. Has no benefit over #putAll(Map, long, TimeUnit)
if used in LOCAL mode.public final org.infinispan.util.concurrent.NotifyingFuture<V> putIfAbsentAsync(K key, V value)
org.infinispan.api.BasicCache
#putIfAbsent(Object, Object)
. This method does not block on remote calls, even if
your cache mode is synchronous. Has no benefit over #putIfAbsent(Object, Object)
if used in LOCAL mode.
public final org.infinispan.util.concurrent.NotifyingFuture<V> putIfAbsentAsync(K key, V value, long lifespan, java.util.concurrent.TimeUnit unit)
org.infinispan.api.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 #putIfAbsent(Object, Object,
long, TimeUnit)
if used in LOCAL mode.public final org.infinispan.util.concurrent.NotifyingFuture<V> replaceAsync(K key, V value, long lifespan, java.util.concurrent.TimeUnit unit)
org.infinispan.api.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 #replace(Object, Object, long,
TimeUnit)
if used in LOCAL mode.public final org.infinispan.util.concurrent.NotifyingFuture<java.lang.Boolean> replaceAsync(K key, V oldValue, V newValue)
org.infinispan.api.BasicCache
#replace(Object, Object, Object)
. This method does not block on remote calls,
even if your cache mode is synchronous. Has no benefit over #replace(Object, Object, Object)
if used in
LOCAL mode.public final org.infinispan.util.concurrent.NotifyingFuture<V> replaceAsync(K key, V value)
org.infinispan.api.BasicCache
#replace(Object, Object)
. This method does not block on remote calls, even if
your cache mode is synchronous. Has no benefit over #replace(Object, Object)
if used in LOCAL mode.public final org.infinispan.util.concurrent.NotifyingFuture<java.lang.Boolean> replaceAsync(K key, V oldValue, V newValue, long lifespan, java.util.concurrent.TimeUnit unit)
org.infinispan.api.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 #replace(Object, Object, Object,
long, TimeUnit)
if used in LOCAL mode.replaceAsync
in interface org.infinispan.api.BasicCache<K,V>
key
- key to removeoldValue
- value to overwritenewValue
- value to storelifespan
- lifespan of entryunit
- time unit for lifespanpublic final V putIfAbsent(K key, V value, long lifespan, java.util.concurrent.TimeUnit unit)
public final void putAll(java.util.Map<? extends K,? extends V> map, long lifespan, java.util.concurrent.TimeUnit unit)