K
- key typeV
- value typepublic abstract class DelegatingRemoteCache<K,V> extends RemoteCacheSupport<K,V> implements InternalRemoteCache<K,V>
InternalRemoteCache
but provides extensibility to intercept
when a method is invoked. Currently all methods are supported except for iterators produced from the
keyIterator(IntSet)
and entryIterator(IntSet)
which are known to invoke back into the delegate cache.Modifier and Type | Field and Description |
---|---|
protected InternalRemoteCache<K,V> |
delegate |
defaultLifespan, defaultMaxIdleTime
Modifier | Constructor and Description |
---|---|
protected |
DelegatingRemoteCache(InternalRemoteCache<K,V> delegate) |
Modifier and Type | Method and Description |
---|---|
void |
addClientListener(Object listener)
Add a client listener to receive events that happen in the remote cache.
|
void |
addClientListener(Object listener,
Object[] filterFactoryParams,
Object[] converterFactoryParams)
Add a client listener to receive events that happen in the remote cache.
|
CompletableFuture<Void> |
clearAsync()
Asynchronous version of
Map.clear() . |
ClientStatistics |
clientStatistics()
Returns client-side statistics for this cache.
|
CompletableFuture<V> |
computeAsync(K key,
BiFunction<? super K,? super V,? extends V> remappingFunction,
long lifespan,
TimeUnit lifespanUnit,
long maxIdle,
TimeUnit maxIdleUnit)
Asynchronous version of
BasicCache.compute(Object, BiFunction, long, TimeUnit, long, TimeUnit) . |
CompletableFuture<V> |
computeIfAbsentAsync(K key,
Function<? super K,? extends V> mappingFunction,
long lifespan,
TimeUnit lifespanUnit,
long maxIdle,
TimeUnit maxIdleUnit)
Asynchronous version of
BasicCache.computeIfAbsent(Object, Function, long, TimeUnit, long, TimeUnit) . |
CompletableFuture<V> |
computeIfPresentAsync(K key,
BiFunction<? super K,? super V,? extends V> remappingFunction,
long lifespan,
TimeUnit lifespanUnit,
long maxIdle,
TimeUnit maxIdleUnit)
Asynchronous version of
BasicCache.computeIfPresent(Object, BiFunction, long, TimeUnit, long, TimeUnit) . |
CompletableFuture<Boolean> |
containsKeyAsync(K key)
Asynchronous version of
Map.containsKey(Object) |
boolean |
containsValue(Object value) |
CloseableIterator<Map.Entry<K,V>> |
entryIterator(IntSet segments) |
CloseableIteratorSet<Map.Entry<K,V>> |
entrySet(IntSet segments)
This method is identical to
RemoteCache.entrySet() except that it will only return entries that map to the given segments. |
<T> T |
execute(String taskName,
Map<String,?> params)
Executes a remote task passing a set of named parameters
|
CompletableFuture<Map<K,V>> |
getAllAsync(Set<?> keys)
TODO This should be in AdvancedCache with getAll
|
CompletableFuture<V> |
getAsync(K 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. |
CacheTopologyInfo |
getCacheTopologyInfo()
Returns
CacheTopologyInfo for this cache. |
DataFormat |
getDataFormat()
Return the currently
DataFormat being used. |
Set<Object> |
getListeners()
Returns a set with all the listeners registered by this client for the
given cache.
|
String |
getName()
Retrieves the name of the cache
|
OperationsFactory |
getOperationsFactory() |
String |
getProtocolVersion()
Returns the HotRod protocol version supported by this RemoteCache implementation
|
RemoteCacheManager |
getRemoteCacheManager()
Returns the
RemoteCacheManager that created this cache. |
String |
getVersion()
Retrieves the version of Infinispan
|
CompletableFuture<MetadataValue<V>> |
getWithMetadataAsync(K key)
Asynchronously returns the
MetadataValue associated to the supplied key param, or null if it doesn't exist. |
boolean |
hasForceReturnFlag() |
void |
init(Marshaller marshaller,
OperationsFactory operationsFactory,
Configuration configuration) |
void |
init(Marshaller marshaller,
OperationsFactory operationsFactory,
Configuration configuration,
ObjectName jmxParent) |
boolean |
isEmpty() |
boolean |
isObjectStorage() |
boolean |
isTransactional() |
K |
keyAsObjectIfNeeded(Object key) |
CloseableIterator<K> |
keyIterator(IntSet segments) |
CloseableIteratorSet<K> |
keySet(IntSet segments)
This method is identical to
RemoteCache.keySet() except that it will only return keys that map to the given segments. |
byte[] |
keyToBytes(Object o) |
CompletableFuture<V> |
mergeAsync(K key,
V value,
BiFunction<? super V,? super V,? extends V> remappingFunction,
long lifespan,
TimeUnit lifespanUnit,
long maxIdleTime,
TimeUnit maxIdleTimeUnit)
Asynchronous version of
BasicCache.merge(Object, Object, BiFunction, long, TimeUnit, long, TimeUnit) . |
<E> org.reactivestreams.Publisher<Map.Entry<K,E>> |
publishEntries(String filterConverterFactory,
Object[] filterConverterParams,
Set<Integer> segments,
int batchSize)
Publishes the entries from the server in a non blocking fashion.
|
<E> org.reactivestreams.Publisher<Map.Entry<K,E>> |
publishEntriesByQuery(org.infinispan.query.dsl.Query<?> filterQuery,
Set<Integer> segments,
int batchSize)
Publish entries from the server matching a query.
|
org.reactivestreams.Publisher<Map.Entry<K,MetadataValue<V>>> |
publishEntriesWithMetadata(Set<Integer> segments,
int batchSize)
Publish entries with metadata information
|
CompletableFuture<Void> |
putAllAsync(Map<? extends K,? extends V> data,
long lifespan,
TimeUnit lifespanUnit,
long maxIdle,
TimeUnit maxIdleUnit)
Adds or overrides each specified entry in the remote cache.
|
CompletableFuture<V> |
putAsync(K key,
V value,
long lifespan,
TimeUnit lifespanUnit,
long maxIdle,
TimeUnit maxIdleUnit)
Asynchronous version of
BasicCache.put(Object, Object, long, TimeUnit, long, TimeUnit) . |
CompletableFuture<V> |
putIfAbsentAsync(K key,
V value,
long lifespan,
TimeUnit lifespanUnit,
long maxIdle,
TimeUnit maxIdleUnit)
Asynchronous version of
BasicCache.putIfAbsent(Object, Object, long, TimeUnit, long, TimeUnit) . |
CompletableFuture<V> |
removeAsync(Object key)
Asynchronous version of
BasicCache.remove(Object) . |
CompletableFuture<Boolean> |
removeAsync(Object key,
Object value)
Asynchronous version of
ConcurrentMap.remove(Object, Object) . |
void |
removeClientListener(Object listener)
Remove a previously added client listener.
|
CompletableFuture<Boolean> |
removeWithVersionAsync(K key,
long version) |
void |
replaceAll(BiFunction<? super K,? super V,? extends V> function) |
CompletableFuture<V> |
replaceAsync(K key,
V value,
long lifespan,
TimeUnit lifespanUnit,
long maxIdle,
TimeUnit maxIdleUnit)
Asynchronous version of
BasicCache.replace(Object, Object, long, TimeUnit, long, TimeUnit) . |
CompletableFuture<Boolean> |
replaceAsync(K key,
V oldValue,
V newValue,
long lifespan,
TimeUnit lifespanUnit,
long maxIdle,
TimeUnit maxIdleUnit)
Asynchronous version of
BasicCache.replace(Object, Object, Object, long, TimeUnit, long, TimeUnit) . |
CompletableFuture<Boolean> |
replaceWithVersionAsync(K key,
V newValue,
long version,
long lifespanSeconds,
TimeUnit lifespanTimeUnit,
long maxIdle,
TimeUnit maxIdleTimeUnit) |
void |
resolveStorage(boolean objectStorage) |
CloseableIterator<Map.Entry<Object,Object>> |
retrieveEntries(String filterConverterFactory,
Object[] filterConverterParams,
Set<Integer> segments,
int batchSize)
Retrieve entries from the server.
|
CloseableIterator<Map.Entry<Object,Object>> |
retrieveEntriesByQuery(org.infinispan.query.dsl.Query<?> filterQuery,
Set<Integer> segments,
int batchSize)
Retrieve entries from the server matching a query.
|
CloseableIterator<Map.Entry<Object,MetadataValue<Object>>> |
retrieveEntriesWithMetadata(Set<Integer> segments,
int batchSize)
Retrieve entries with metadata information
|
ServerStatistics |
serverStatistics()
Returns server-side statistics for this cache.
|
CompletableFuture<Long> |
sizeAsync()
Asynchronous version of
Map.size() . |
void |
start()
Invoked on component start
|
void |
stop()
Invoked on component stop
|
StreamingRemoteCache<K> |
streaming()
Returns a cache where values are manipulated using
InputStream and OutputStream |
CloseableIteratorCollection<V> |
values(IntSet segments)
This method is identical to
RemoteCache.values() except that it will only return values that map to the given segments. |
<T,U> InternalRemoteCache<T,U> |
withDataFormat(DataFormat dataFormat)
Return a new instance of
RemoteCache using the supplied DataFormat . |
InternalRemoteCache<K,V> |
withFlags(Flag... flags)
Applies one or more
Flag s to the scope of a single invocation. |
clear, compute, compute, compute, computeAsync, computeAsync, computeIfAbsent, computeIfAbsent, computeIfAbsent, computeIfAbsentAsync, computeIfAbsentAsync, computeIfPresent, computeIfPresent, computeIfPresent, computeIfPresentAsync, computeIfPresentAsync, containsKey, get, getAll, getWithMetadata, merge, merge, merge, mergeAsync, mergeAsync, put, put, put, putAll, putAll, putAll, putAllAsync, putAllAsync, putAsync, putAsync, putIfAbsent, putIfAbsent, putIfAbsent, putIfAbsentAsync, putIfAbsentAsync, remove, remove, removeWithVersion, replace, replace, replace, replace, replace, replace, replaceAsync, replaceAsync, replaceAsync, replaceAsync, replaceWithVersion, replaceWithVersion, replaceWithVersion, replaceWithVersion, replaceWithVersionAsync, replaceWithVersionAsync, replaceWithVersionAsync, size
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
removeEntry, removeEntry
entrySet, execute, getAll, getWithMetadata, keySet, putAll, putAll, putAll, putAllAsync, putAllAsync, remove, remove, removeWithVersion, replace, replace, replace, replaceWithVersion, replaceWithVersion, replaceWithVersion, replaceWithVersion, replaceWithVersionAsync, replaceWithVersionAsync, replaceWithVersionAsync, retrieveEntries, retrieveEntries, stats, values
compute, compute, computeIfAbsent, computeIfAbsent, computeIfPresent, computeIfPresent, merge, merge, put, put, put, putIfAbsent, putIfAbsent, replace, replace
computeAsync, computeAsync, computeIfAbsentAsync, computeIfAbsentAsync, computeIfPresentAsync, computeIfPresentAsync, mergeAsync, mergeAsync, putAsync, putAsync, putIfAbsentAsync, putIfAbsentAsync, replaceAsync, replaceAsync, replaceAsync, replaceAsync
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, replace
getTransactionManager
protected final InternalRemoteCache<K,V> delegate
protected DelegatingRemoteCache(InternalRemoteCache<K,V> delegate)
public CompletableFuture<Void> putAllAsync(Map<? extends K,? extends V> data, long lifespan, TimeUnit lifespanUnit, long maxIdle, TimeUnit maxIdleUnit)
RemoteCache
putAllAsync
in interface RemoteCache<K,V>
putAllAsync
in interface AsyncCache<K,V>
putAllAsync
in class RemoteCacheSupport<K,V>
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 timeRemoteCache.putAll(java.util.Map, long, java.util.concurrent.TimeUnit)
public CompletableFuture<Void> clearAsync()
AsyncCache
Map.clear()
. This method does not block on remote calls, even if your cache mode is
synchronous.clearAsync
in interface AsyncCache<K,V>
public ClientStatistics clientStatistics()
RemoteCache
clientStatistics
in interface InternalRemoteCache<K,V>
clientStatistics
in interface RemoteCache<K,V>
public ServerStatistics serverStatistics()
RemoteCache
serverStatistics
in interface RemoteCache<K,V>
public InternalRemoteCache<K,V> withFlags(Flag... flags)
RemoteCache
Flag
s to the scope of a single invocation. See the Flag
enumeration to for
information on available flags.
Sample usage:
remoteCache.withFlags(Flag.FORCE_RETURN_VALUE).put("hello", "world");
withFlags
in interface InternalRemoteCache<K,V>
withFlags
in interface RemoteCache<K,V>
public RemoteCacheManager getRemoteCacheManager()
RemoteCache
RemoteCacheManager
that created this cache.getRemoteCacheManager
in interface RemoteCache<K,V>
public CompletableFuture<Map<K,V>> getAllAsync(Set<?> keys)
AsyncCache
getAllAsync
in interface AsyncCache<K,V>
getAllAsync
in class RemoteCacheSupport<K,V>
public String getProtocolVersion()
RemoteCache
getProtocolVersion
in interface RemoteCache<K,V>
public void addClientListener(Object listener)
RemoteCache
ClientListener
annotation.addClientListener
in interface RemoteCache<K,V>
public void addClientListener(Object listener, Object[] filterFactoryParams, Object[] converterFactoryParams)
RemoteCache
addClientListener
in interface RemoteCache<K,V>
public void removeClientListener(Object listener)
RemoteCache
removeClientListener
in interface RemoteCache<K,V>
public Set<Object> getListeners()
RemoteCache
getListeners
in interface RemoteCache<K,V>
public <T> T execute(String taskName, Map<String,?> params)
RemoteCache
execute
in interface RemoteCache<K,V>
public CacheTopologyInfo getCacheTopologyInfo()
RemoteCache
CacheTopologyInfo
for this cache.getCacheTopologyInfo
in interface RemoteCache<K,V>
public StreamingRemoteCache<K> streaming()
RemoteCache
InputStream
and OutputStream
streaming
in interface RemoteCache<K,V>
public <T,U> InternalRemoteCache<T,U> withDataFormat(DataFormat dataFormat)
RemoteCache
RemoteCache
using the supplied DataFormat
.withDataFormat
in interface InternalRemoteCache<K,V>
withDataFormat
in interface RemoteCache<K,V>
public DataFormat getDataFormat()
RemoteCache
DataFormat
being used.getDataFormat
in interface RemoteCache<K,V>
public boolean isTransactional()
isTransactional
in interface RemoteCache<K,V>
true
if the cache can participate in a transaction, false
otherwise.public CompletableFuture<V> putIfAbsentAsync(K key, V value, long lifespan, TimeUnit lifespanUnit, long maxIdle, TimeUnit maxIdleUnit)
AsyncCache
BasicCache.putIfAbsent(Object, Object, long, TimeUnit, long, TimeUnit)
. This method does
not block on remote calls, even if your cache mode is synchronous.putIfAbsentAsync
in interface AsyncCache<K,V>
putIfAbsentAsync
in class RemoteCacheSupport<K,V>
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 timepublic CompletableFuture<Boolean> replaceAsync(K key, V oldValue, V newValue, long lifespan, TimeUnit lifespanUnit, long maxIdle, TimeUnit maxIdleUnit)
AsyncCache
BasicCache.replace(Object, Object, Object, long, TimeUnit, long, TimeUnit)
. This method
does not block on remote calls, even if your cache mode is synchronous.replaceAsync
in interface AsyncCache<K,V>
replaceAsync
in class RemoteCacheSupport<K,V>
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 timepublic CompletableFuture<V> replaceAsync(K key, V value, long lifespan, TimeUnit lifespanUnit, long maxIdle, TimeUnit maxIdleUnit)
AsyncCache
BasicCache.replace(Object, Object, long, TimeUnit, long, TimeUnit)
. This method does not
block on remote calls, even if your cache mode is synchronous.replaceAsync
in interface AsyncCache<K,V>
replaceAsync
in class RemoteCacheSupport<K,V>
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 timepublic CompletableFuture<V> getAsync(K key)
AsyncCache
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 stores are configured, the get asynchronous call will act
sequentially and will have no different to Map.get(Object)
.getAsync
in interface AsyncCache<K,V>
getAsync
in class RemoteCacheSupport<K,V>
key
- key to retrieveMap.get(Object)
public CompletableFuture<MetadataValue<V>> getWithMetadataAsync(K key)
RemoteCache
MetadataValue
associated to the supplied key param, or null if it doesn't exist.getWithMetadataAsync
in interface RemoteCache<K,V>
getWithMetadataAsync
in class RemoteCacheSupport<K,V>
public boolean containsValue(Object value)
containsValue
in interface Map<K,V>
public CloseableIteratorSet<K> keySet(IntSet segments)
RemoteCache
RemoteCache.keySet()
except that it will only return keys that map to the given segments.
Note that these segments will be determined by the remote server. Thus you should be aware of how many segments
it has configured and hashing algorithm it is using. If the segments and hashing algorithm are not the same
this method may return unexpected keys.keySet
in interface RemoteCache<K,V>
segments
- the segments of keys to return - null means all availableRemoteCache.keySet()
public CloseableIteratorCollection<V> values(IntSet segments)
RemoteCache
RemoteCache.values()
except that it will only return values that map to the given segments.
Note that these segments will be determined by the remote server. Thus you should be aware of how many segments
it has configured and hashing algorithm it is using. If the segments and hashing algorithm are not the same
this method may return unexpected values.values
in interface RemoteCache<K,V>
segments
- the segments of values to return - null means all availableRemoteCache.values()
public CloseableIteratorSet<Map.Entry<K,V>> entrySet(IntSet segments)
RemoteCache
RemoteCache.entrySet()
except that it will only return entries that map to the given segments.
Note that these segments will be determined by the remote server. Thus you should be aware of how many segments
it has configured and hashing algorithm it is using. If the segments and hashing algorithm are not the same
this method may return unexpected entries.entrySet
in interface RemoteCache<K,V>
segments
- the segments of entries to return - null means all availableRemoteCache.entrySet()
public CompletableFuture<Boolean> containsKeyAsync(K key)
AsyncCache
Map.containsKey(Object)
containsKeyAsync
in interface AsyncCache<K,V>
containsKeyAsync
in class RemoteCacheSupport<K,V>
key
- key to retrievepublic CompletableFuture<V> putAsync(K key, V value, long lifespan, TimeUnit lifespanUnit, long maxIdle, TimeUnit maxIdleUnit)
AsyncCache
BasicCache.put(Object, Object, long, TimeUnit, long, TimeUnit)
. This method does not block
on remote calls, even if your cache mode is synchronous.putAsync
in interface AsyncCache<K,V>
putAsync
in class RemoteCacheSupport<K,V>
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 timepublic CompletableFuture<Boolean> replaceWithVersionAsync(K key, V newValue, long version, long lifespanSeconds, TimeUnit lifespanTimeUnit, long maxIdle, TimeUnit maxIdleTimeUnit)
replaceWithVersionAsync
in interface RemoteCache<K,V>
RemoteCache.replaceWithVersion(Object, Object, long)
public CloseableIterator<Map.Entry<Object,Object>> retrieveEntries(String filterConverterFactory, Object[] filterConverterParams, Set<Integer> segments, int batchSize)
RemoteCache
retrieveEntries
in interface RemoteCache<K,V>
filterConverterFactory
- Factory name for the KeyValueFilterConverter or null for no filtering.filterConverterParams
- Parameters to the KeyValueFilterConvertersegments
- The segments to iterate. If null all segments will be iterated. An empty set will filter out all entries.batchSize
- The number of entries transferred from the server at a time.public <E> org.reactivestreams.Publisher<Map.Entry<K,E>> publishEntries(String filterConverterFactory, Object[] filterConverterParams, Set<Integer> segments, int batchSize)
RemoteCache
Any subscriber that subscribes to the returned Publisher must not block. It is therefore recommended to offload any blocking or long running operations to a different thread and not use the invoking one. Failure to do so may cause concurrent operations to stall.
publishEntries
in interface RemoteCache<K,V>
filterConverterFactory
- Factory name for the KeyValueFilterConverter or null for no filtering.filterConverterParams
- Parameters to the KeyValueFilterConvertersegments
- The segments to utilize. If null all segments will be utilized. An empty set will filter out all entries.batchSize
- The number of entries transferred from the server at a time.public CloseableIterator<Map.Entry<Object,Object>> retrieveEntriesByQuery(org.infinispan.query.dsl.Query<?> filterQuery, Set<Integer> segments, int batchSize)
RemoteCache
retrieveEntriesByQuery
in interface RemoteCache<K,V>
filterQuery
- Query
segments
- The segments to iterate. If null all segments will be iterated. An empty set will filter out all entries.batchSize
- The number of entries transferred from the server at a time.CloseableIterator
public <E> org.reactivestreams.Publisher<Map.Entry<K,E>> publishEntriesByQuery(org.infinispan.query.dsl.Query<?> filterQuery, Set<Integer> segments, int batchSize)
RemoteCache
Any subscriber that subscribes to the returned Publisher must not block. It is therefore recommended to offload any blocking or long running operations to a different thread and not use the invoking one. Failure to do so may cause concurrent operations to stall.
publishEntriesByQuery
in interface RemoteCache<K,V>
filterQuery
- Query
segments
- The segments to utilize. If null all segments will be utilized. An empty set will filter out all entries.batchSize
- The number of entries transferred from the server at a time.public CloseableIterator<Map.Entry<Object,MetadataValue<Object>>> retrieveEntriesWithMetadata(Set<Integer> segments, int batchSize)
RemoteCache
retrieveEntriesWithMetadata
in interface RemoteCache<K,V>
public org.reactivestreams.Publisher<Map.Entry<K,MetadataValue<V>>> publishEntriesWithMetadata(Set<Integer> segments, int batchSize)
RemoteCache
Any subscriber that subscribes to the returned Publisher must not block. It is therefore recommended to offload any blocking or long running operations to a different thread and not use the invoking one. Failure to do so may cause concurrent operations to stall.
publishEntriesWithMetadata
in interface RemoteCache<K,V>
segments
- The segments to utilize. If null all segments will be utilized. An empty set will filter out all entries.batchSize
- The number of entries transferred from the server at a time.public CompletableFuture<V> removeAsync(Object key)
AsyncCache
BasicCache.remove(Object)
. This method does not block on remote calls, even if your cache
mode is synchronous.removeAsync
in interface AsyncCache<K,V>
removeAsync
in class RemoteCacheSupport<K,V>
key
- key to removepublic CompletableFuture<Boolean> removeAsync(Object key, Object value)
AsyncCache
ConcurrentMap.remove(Object, Object)
. This method does not block on remote calls, even if your
cache mode is synchronous.removeAsync
in interface AsyncCache<K,V>
removeAsync
in class RemoteCacheSupport<K,V>
key
- key to removevalue
- value to match onpublic CompletableFuture<Boolean> removeWithVersionAsync(K key, long version)
removeWithVersionAsync
in interface RemoteCache<K,V>
removeWithVersionAsync
in class RemoteCacheSupport<K,V>
RemoteCache.remove(Object, Object)
public CompletableFuture<V> mergeAsync(K key, V value, BiFunction<? super V,? super V,? extends V> remappingFunction, long lifespan, TimeUnit lifespanUnit, long maxIdleTime, TimeUnit maxIdleTimeUnit)
AsyncCache
BasicCache.merge(Object, Object, BiFunction, long, TimeUnit, long, TimeUnit)
. This
method does not block on remote calls, even if your cache mode is synchronous.mergeAsync
in interface AsyncCache<K,V>
mergeAsync
in class RemoteCacheSupport<K,V>
public CompletableFuture<V> computeAsync(K key, BiFunction<? super K,? super V,? extends V> remappingFunction, long lifespan, TimeUnit lifespanUnit, long maxIdle, TimeUnit maxIdleUnit)
AsyncCache
BasicCache.compute(Object, BiFunction, long, TimeUnit, long, TimeUnit)
. This method does not block on remote
calls, even if your cache mode is synchronous.computeAsync
in interface AsyncCache<K,V>
computeAsync
in class RemoteCacheSupport<K,V>
public CompletableFuture<V> computeIfAbsentAsync(K key, Function<? super K,? extends V> mappingFunction, long lifespan, TimeUnit lifespanUnit, long maxIdle, TimeUnit maxIdleUnit)
AsyncCache
BasicCache.computeIfAbsent(Object, Function, long, TimeUnit, long, TimeUnit)
. This method does not block on remote
calls, even if your cache mode is synchronous.computeIfAbsentAsync
in interface AsyncCache<K,V>
computeIfAbsentAsync
in class RemoteCacheSupport<K,V>
public CompletableFuture<V> computeIfPresentAsync(K key, BiFunction<? super K,? super V,? extends V> remappingFunction, long lifespan, TimeUnit lifespanUnit, long maxIdle, TimeUnit maxIdleUnit)
AsyncCache
BasicCache.computeIfPresent(Object, BiFunction, long, TimeUnit, long, TimeUnit)
. This method does not block on
remote calls, even if your cache mode is synchronous.computeIfPresentAsync
in interface AsyncCache<K,V>
computeIfPresentAsync
in class RemoteCacheSupport<K,V>
public void replaceAll(BiFunction<? super K,? super V,? extends V> function)
replaceAll
in interface ConcurrentMap<K,V>
replaceAll
in interface Map<K,V>
replaceAll
in class RemoteCacheSupport<K,V>
public CompletableFuture<Long> sizeAsync()
AsyncCache
Map.size()
. This method does not block on remote calls, even if your cache mode is
synchronous.sizeAsync
in interface AsyncCache<K,V>
sizeAsync
in class RemoteCacheSupport<K,V>
public String getName()
BasicCache
getName
in interface BasicCache<K,V>
public String getVersion()
BasicCache
getVersion
in interface BasicCache<K,V>
public void start()
Lifecycle
public void stop()
Lifecycle
public CloseableIterator<K> keyIterator(IntSet segments)
keyIterator
in interface InternalRemoteCache<K,V>
public CloseableIterator<Map.Entry<K,V>> entryIterator(IntSet segments)
entryIterator
in interface InternalRemoteCache<K,V>
public boolean hasForceReturnFlag()
hasForceReturnFlag
in interface InternalRemoteCache<K,V>
public void resolveStorage(boolean objectStorage)
resolveStorage
in interface InternalRemoteCache<K,V>
public K keyAsObjectIfNeeded(Object key)
keyAsObjectIfNeeded
in interface InternalRemoteCache<K,V>
public byte[] keyToBytes(Object o)
keyToBytes
in interface InternalRemoteCache<K,V>
public void init(Marshaller marshaller, OperationsFactory operationsFactory, Configuration configuration, ObjectName jmxParent)
init
in interface InternalRemoteCache<K,V>
public void init(Marshaller marshaller, OperationsFactory operationsFactory, Configuration configuration)
init
in interface InternalRemoteCache<K,V>
public OperationsFactory getOperationsFactory()
getOperationsFactory
in interface InternalRemoteCache<K,V>
public boolean isObjectStorage()
isObjectStorage
in interface InternalRemoteCache<K,V>
Copyright © 2021 JBoss by Red Hat. All rights reserved.