Package org.infinispan.cache.impl
Class CacheSupport<K,V>
- java.lang.Object
-
- org.infinispan.cache.impl.CacheSupport<K,V>
-
- All Implemented Interfaces:
ConcurrentMap<K,V>
,Map<K,V>
,org.infinispan.commons.api.AsyncCache<K,V>
,org.infinispan.commons.api.BasicCache<K,V>
,org.infinispan.commons.api.Lifecycle
public abstract class CacheSupport<K,V> extends Object implements org.infinispan.commons.api.BasicCache<K,V>
- Since:
- 4.1
- Author:
- Mircea.Markus@jboss.com
-
-
Field Summary
Fields Modifier and Type Field Description protected long
defaultLifespan
protected long
defaultMaxIdleTime
-
Constructor Summary
Constructors Modifier Constructor Description protected
CacheSupport()
protected
CacheSupport(long defaultLifespan, long defaultMaxIdleTime)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description V
merge(K key, V value, BiFunction<? super V,? super V,? extends V> remappingFunction)
V
merge(K key, V value, BiFunction<? super V,? super V,? extends V> remappingFunction, long lifespan, TimeUnit lifespanUnit)
V
put(K key, V value)
V
put(K key, V value, long lifespan, TimeUnit unit)
void
putAll(Map<? extends K,? extends V> map)
void
putAll(Map<? extends K,? extends V> map, long lifespan, TimeUnit unit)
CompletableFuture<Void>
putAllAsync(Map<? extends K,? extends V> data)
CompletableFuture<Void>
putAllAsync(Map<? extends K,? extends V> data, long lifespan, TimeUnit unit)
CompletableFuture<V>
putAsync(K key, V value)
CompletableFuture<V>
putAsync(K key, V value, long lifespan, TimeUnit unit)
V
putIfAbsent(K key, V value)
V
putIfAbsent(K key, V value, long lifespan, TimeUnit unit)
CompletableFuture<V>
putIfAbsentAsync(K key, V value)
CompletableFuture<V>
putIfAbsentAsync(K key, V value, long lifespan, TimeUnit unit)
V
replace(K key, V value)
V
replace(K key, V value, long lifespan, TimeUnit unit)
boolean
replace(K key, V oldValue, V newValue)
boolean
replace(K key, V oldValue, V value, long lifespan, TimeUnit unit)
CompletableFuture<V>
replaceAsync(K key, V value)
CompletableFuture<V>
replaceAsync(K key, V value, long lifespan, TimeUnit unit)
CompletableFuture<Boolean>
replaceAsync(K key, V oldValue, V newValue)
CompletableFuture<Boolean>
replaceAsync(K key, V oldValue, V newValue, long lifespan, TimeUnit unit)
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.commons.api.AsyncCache
clearAsync, containsKeyAsync, getAllAsync, getAsync, putAllAsync, putAsync, putIfAbsentAsync, removeAsync, removeAsync, replaceAsync, replaceAsync
-
Methods inherited from interface org.infinispan.commons.api.BasicCache
getName, getVersion, merge, put, putAll, putIfAbsent, remove, replace, replace
-
Methods inherited from interface java.util.concurrent.ConcurrentMap
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, remove, replaceAll
-
-
-
-
Method Detail
-
set
protected abstract void set(K key, V value)
This is intentionally a non-public method meant as an integration point for bytecode manipulation. Don't remove or alter the signature even if it might look like unreachable code. Implementors should perform a put operation but optimizing it as return values are not required.- Since:
- 5.0
-
putAsync
public final CompletableFuture<V> putAsync(K key, V value)
-
putIfAbsent
public final V putIfAbsent(K key, V value)
- Specified by:
putIfAbsent
in interfaceConcurrentMap<K,V>
- Specified by:
putIfAbsent
in interfaceMap<K,V>
-
putAsync
public final CompletableFuture<V> putAsync(K key, V value, long lifespan, TimeUnit unit)
-
putAllAsync
public final CompletableFuture<Void> putAllAsync(Map<? extends K,? extends V> data)
-
putAllAsync
public final CompletableFuture<Void> putAllAsync(Map<? extends K,? extends V> data, long lifespan, TimeUnit unit)
-
putIfAbsentAsync
public final CompletableFuture<V> putIfAbsentAsync(K key, V value)
-
putIfAbsentAsync
public final CompletableFuture<V> putIfAbsentAsync(K key, V value, long lifespan, TimeUnit unit)
-
replaceAsync
public final CompletableFuture<V> replaceAsync(K key, V value, long lifespan, TimeUnit unit)
-
replaceAsync
public final CompletableFuture<Boolean> replaceAsync(K key, V oldValue, V newValue)
-
replaceAsync
public final CompletableFuture<V> replaceAsync(K key, V value)
-
replaceAsync
public final CompletableFuture<Boolean> replaceAsync(K key, V oldValue, V newValue, long lifespan, TimeUnit unit)
-
merge
public final V merge(K key, V value, BiFunction<? super V,? super V,? extends V> remappingFunction)
-
-