Class DelegatingRemoteCache<K,V>
- Type Parameters:
K
- key typeV
- value type
- All Implemented Interfaces:
ConcurrentMap<K,
,V> Map<K,
,V> InternalRemoteCache<K,
,V> RemoteCache<K,
,V> AsyncCache<K,
,V> BasicCache<K,
,V> Lifecycle
,TransactionalCache
- Direct Known Subclasses:
InvalidatedNearRemoteCache
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.-
Nested Class Summary
-
Field Summary
Fields inherited from class org.infinispan.client.hotrod.impl.RemoteCacheSupport
defaultLifespan, defaultMaxIdleTime
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
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.addNearCacheListener
(Object listener, int bloomBits) Add a client listener to handle near cache with bloom filter optimization The listener object must be annotated with @ClientListener
annotation.Asynchronous version ofMap.clear()
.Returns client-side statistics for this cache.computeAsync
(K key, BiFunction<? super K, ? super V, ? extends V> remappingFunction, long lifespan, TimeUnit lifespanUnit, long maxIdle, TimeUnit maxIdleUnit) Asynchronous version ofBasicCache.compute(Object, BiFunction, long, TimeUnit, long, TimeUnit)
.computeIfAbsentAsync
(K key, Function<? super K, ? extends V> mappingFunction, long lifespan, TimeUnit lifespanUnit, long maxIdle, TimeUnit maxIdleUnit) Asynchronous version ofBasicCache.computeIfAbsent(Object, Function, long, TimeUnit, long, TimeUnit)
.computeIfPresentAsync
(K key, BiFunction<? super K, ? super V, ? extends V> remappingFunction, long lifespan, TimeUnit lifespanUnit, long maxIdle, TimeUnit maxIdleUnit) Asynchronous version ofBasicCache.computeIfPresent(Object, BiFunction, long, TimeUnit, long, TimeUnit)
.containsKeyAsync
(K key) Asynchronous version ofMap.containsKey(Object)
boolean
containsValue
(Object value) entryIterator
(IntSet segments) This method is identical toRemoteCache.entrySet()
except that it will only return entries that map to the given segments.<T> T
Executes a remote task passing a set of named parametersgetAllAsync
(Set<?> keys) TODO This should be in AdvancedCache with getAllAsynchronous version ofMap.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.ReturnsCacheTopologyInfo
for this cache.Return the currentlyDataFormat
being used.Returns a set with all the listeners registered by this client for the given cache.getName()
Retrieves the name of the cacheorg.infinispan.client.hotrod.impl.operations.OperationsFactory
Returns the HotRod protocol version supported by this RemoteCache implementationReturns theRemoteCacheContainer
that created this cache.Retrieves the version of InfinispangetWithMetadataAsync
(K key) Asynchronously returns theMetadataValue
associated to the supplied key param, or null if it doesn't exist.org.infinispan.client.hotrod.impl.operations.RetryAwareCompletionStage
<MetadataValue<V>> getWithMetadataAsync
(K key, SocketAddress preferredAddres) boolean
void
init
(org.infinispan.client.hotrod.impl.operations.OperationsFactory operationsFactory, Configuration configuration) void
init
(org.infinispan.client.hotrod.impl.operations.OperationsFactory operationsFactory, Configuration configuration, ObjectName jmxParent) boolean
isEmpty()
boolean
boolean
keyIterator
(IntSet segments) This method is identical toRemoteCache.keySet()
except that it will only return keys that map to the given segments.byte[]
keyToBytes
(Object o) mergeAsync
(K key, V value, BiFunction<? super V, ? super V, ? extends V> remappingFunction, long lifespan, TimeUnit lifespanUnit, long maxIdleTime, TimeUnit maxIdleTimeUnit) Asynchronous version ofBasicCache.merge(Object, Object, BiFunction, long, TimeUnit, long, TimeUnit)
.CompletionStage
<org.infinispan.client.hotrod.impl.operations.PingResponse> ping()
publishEntries
(String filterConverterFactory, Object[] filterConverterParams, Set<Integer> segments, int batchSize) Publishes the entries from the server in a non blocking fashion.publishEntriesByQuery
(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 informationputAllAsync
(Map<? extends K, ? extends V> data, long lifespan, TimeUnit lifespanUnit, long maxIdle, TimeUnit maxIdleUnit) Adds or overrides each specified entry in the remote cache.Asynchronous version ofBasicCache.put(Object, Object, long, TimeUnit, long, TimeUnit)
.putIfAbsentAsync
(K key, V value, long lifespan, TimeUnit lifespanUnit, long maxIdle, TimeUnit maxIdleUnit) Asynchronous version ofBasicCache.putIfAbsent(Object, Object, long, TimeUnit, long, TimeUnit)
.removeAsync
(Object key) Asynchronous version ofBasicCache.remove(Object)
.removeAsync
(Object key, Object value) Asynchronous version ofConcurrentMap.remove(Object, Object)
.void
removeClientListener
(Object listener) Remove a previously added client listener.removeWithVersionAsync
(K key, long version) void
replaceAll
(BiFunction<? super K, ? super V, ? extends V> function) replaceAsync
(K key, V value, long lifespan, TimeUnit lifespanUnit, long maxIdle, TimeUnit maxIdleUnit) Asynchronous version ofBasicCache.replace(Object, Object, long, TimeUnit, long, TimeUnit)
.replaceAsync
(K key, V oldValue, V newValue, long lifespan, TimeUnit lifespanUnit, long maxIdle, TimeUnit maxIdleUnit) Asynchronous version ofBasicCache.replace(Object, Object, Object, long, TimeUnit, long, TimeUnit)
.replaceWithVersionAsync
(K key, V newValue, long version, long lifespanSeconds, TimeUnit lifespanTimeUnit, long maxIdle, TimeUnit maxIdleTimeUnit) void
resolveStorage
(boolean objectStorage) retrieveEntries
(String filterConverterFactory, Object[] filterConverterParams, Set<Integer> segments, int batchSize) Retrieve entries from the server.retrieveEntriesByQuery
(Query<?> filterQuery, Set<Integer> segments, int batchSize) Retrieve entries from the server matching a query.retrieveEntriesWithMetadata
(Set<Integer> segments, int batchSize) Retrieve entries with metadata informationReturns server-side statistics for this cache.Returns server-side statistics for this cache.Asynchronous version ofMap.size()
.void
start()
Invoked on component startvoid
stop()
Invoked on component stopReturns a cache where values are manipulated usingInputStream
andOutputStream
Sends the current bloom filter to the listener node where a near cache listener is installed.This method is identical toRemoteCache.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 ofRemoteCache
using the suppliedDataFormat
.Applies one or moreFlag
s to the scope of a single invocation.Methods inherited from class org.infinispan.client.hotrod.impl.RemoteCacheSupport
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
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
computeAsync, computeAsync, computeIfAbsentAsync, computeIfAbsentAsync, computeIfPresentAsync, computeIfPresentAsync, mergeAsync, mergeAsync, putAsync, putAsync, putIfAbsentAsync, putIfAbsentAsync, replaceAsync, replaceAsync, replaceAsync, replaceAsync
Methods inherited from interface org.infinispan.commons.api.BasicCache
compute, compute, computeIfAbsent, computeIfAbsent, computeIfPresent, computeIfPresent, merge, merge, put, put, put, putIfAbsent, putIfAbsent, replace, replace
Methods inherited from interface java.util.concurrent.ConcurrentMap
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, replace
Methods inherited from interface org.infinispan.client.hotrod.impl.InternalRemoteCache
removeEntry, removeEntry, resolveStorage
Methods inherited from interface org.infinispan.client.hotrod.RemoteCache
entrySet, execute, execute, getAll, getRemoteCacheManager, getWithMetadata, keySet, putAll, putAll, putAll, putAllAsync, putAllAsync, remove, remove, removeWithVersion, replace, replace, replace, replaceWithVersion, replaceWithVersion, replaceWithVersion, replaceWithVersion, replaceWithVersionAsync, replaceWithVersionAsync, replaceWithVersionAsync, retrieveEntries, retrieveEntries, stats, values
Methods inherited from interface org.infinispan.commons.api.TransactionalCache
getTransactionManager
-
Field Details
-
delegate
-
-
Constructor Details
-
DelegatingRemoteCache
-
-
Method Details
-
putAllAsync
public CompletableFuture<Void> putAllAsync(Map<? extends K, ? extends V> data, long lifespan, TimeUnit lifespanUnit, long maxIdle, TimeUnit maxIdleUnit) Description copied from interface:RemoteCache
Adds or overrides each specified entry in the remote cache. This operation provides better performance than calling put() for each entry.- Specified by:
putAllAsync
in interfaceAsyncCache<K,
V> - Specified by:
putAllAsync
in interfaceRemoteCache<K,
V> - Specified by:
putAllAsync
in classRemoteCacheSupport<K,
V> - Parameters:
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- Returns:
- a future containing a void return type
- See Also:
-
clearAsync
Description copied from interface:AsyncCache
Asynchronous version ofMap.clear()
. This method does not block on remote calls, even if your cache mode is synchronous.- Specified by:
clearAsync
in interfaceAsyncCache<K,
V> - Returns:
- a future containing a void return type
-
clientStatistics
Description copied from interface:RemoteCache
Returns client-side statistics for this cache.- Specified by:
clientStatistics
in interfaceInternalRemoteCache<K,
V> - Specified by:
clientStatistics
in interfaceRemoteCache<K,
V>
-
serverStatistics
Description copied from interface:RemoteCache
Returns server-side statistics for this cache.- Specified by:
serverStatistics
in interfaceRemoteCache<K,
V>
-
serverStatisticsAsync
Description copied from interface:RemoteCache
Returns server-side statistics for this cache.- Specified by:
serverStatisticsAsync
in interfaceRemoteCache<K,
V>
-
withFlags
Description copied from interface:RemoteCache
Applies one or moreFlag
s to the scope of a single invocation. See theFlag
enumeration to for information on available flags. Sample usage:remoteCache.withFlags(Flag.FORCE_RETURN_VALUE).put("hello", "world");
- Specified by:
withFlags
in interfaceInternalRemoteCache<K,
V> - Specified by:
withFlags
in interfaceRemoteCache<K,
V> - Parameters:
flags
-- Returns:
- the current RemoteCache instance to continue running operations on.
-
getRemoteCacheContainer
Description copied from interface:RemoteCache
Returns theRemoteCacheContainer
that created this cache.- Specified by:
getRemoteCacheContainer
in interfaceRemoteCache<K,
V>
-
getAllAsync
Description copied from interface:AsyncCache
TODO This should be in AdvancedCache with getAll- Specified by:
getAllAsync
in interfaceAsyncCache<K,
V> - Specified by:
getAllAsync
in classRemoteCacheSupport<K,
V>
-
getProtocolVersion
Description copied from interface:RemoteCache
Returns the HotRod protocol version supported by this RemoteCache implementation- Specified by:
getProtocolVersion
in interfaceRemoteCache<K,
V>
-
addClientListener
Description copied from interface:RemoteCache
Add a client listener to receive events that happen in the remote cache. The listener object must be annotated with @ClientListener
annotation.- Specified by:
addClientListener
in interfaceRemoteCache<K,
V>
-
addClientListener
public void addClientListener(Object listener, Object[] filterFactoryParams, Object[] converterFactoryParams) Description copied from interface:RemoteCache
Add a client listener to receive events that happen in the remote cache. The listener object must be annotated with @ClientListener annotation.- Specified by:
addClientListener
in interfaceRemoteCache<K,
V>
-
removeClientListener
Description copied from interface:RemoteCache
Remove a previously added client listener. If the listener was not added before, this operation is a no-op.- Specified by:
removeClientListener
in interfaceRemoteCache<K,
V>
-
addNearCacheListener
Description copied from interface:InternalRemoteCache
Add a client listener to handle near cache with bloom filter optimization The listener object must be annotated with @ClientListener
annotation.- Specified by:
addNearCacheListener
in interfaceInternalRemoteCache<K,
V>
-
getListeners
Description copied from interface:RemoteCache
Returns a set with all the listeners registered by this client for the given cache.- Specified by:
getListeners
in interfaceRemoteCache<K,
V>
-
execute
Description copied from interface:RemoteCache
Executes a remote task passing a set of named parameters- Specified by:
execute
in interfaceRemoteCache<K,
V>
-
getCacheTopologyInfo
Description copied from interface:RemoteCache
ReturnsCacheTopologyInfo
for this cache.- Specified by:
getCacheTopologyInfo
in interfaceRemoteCache<K,
V>
-
streaming
Description copied from interface:RemoteCache
Returns a cache where values are manipulated usingInputStream
andOutputStream
- Specified by:
streaming
in interfaceRemoteCache<K,
V>
-
withDataFormat
Description copied from interface:RemoteCache
Return a new instance ofRemoteCache
using the suppliedDataFormat
.- Specified by:
withDataFormat
in interfaceInternalRemoteCache<K,
V> - Specified by:
withDataFormat
in interfaceRemoteCache<K,
V>
-
getDataFormat
Description copied from interface:RemoteCache
Return the currentlyDataFormat
being used.- Specified by:
getDataFormat
in interfaceRemoteCache<K,
V>
-
isTransactional
public boolean isTransactional()- Specified by:
isTransactional
in interfaceRemoteCache<K,
V> - Returns:
true
if the cache can participate in a transaction,false
otherwise.
-
putIfAbsentAsync
public CompletableFuture<V> putIfAbsentAsync(K key, V value, long lifespan, TimeUnit lifespanUnit, long maxIdle, TimeUnit maxIdleUnit) Description copied from interface:AsyncCache
Asynchronous version ofBasicCache.putIfAbsent(Object, Object, long, TimeUnit, long, TimeUnit)
. This method does not block on remote calls, even if your cache mode is synchronous.- Specified by:
putIfAbsentAsync
in interfaceAsyncCache<K,
V> - Specified by:
putIfAbsentAsync
in classRemoteCacheSupport<K,
V> - Parameters:
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- Returns:
- a future containing the old value replaced
-
replaceAsync
public CompletableFuture<Boolean> replaceAsync(K key, V oldValue, V newValue, long lifespan, TimeUnit lifespanUnit, long maxIdle, TimeUnit maxIdleUnit) Description copied from interface:AsyncCache
Asynchronous version ofBasicCache.replace(Object, Object, Object, long, TimeUnit, long, TimeUnit)
. This method does not block on remote calls, even if your cache mode is synchronous.- Specified by:
replaceAsync
in interfaceAsyncCache<K,
V> - Specified by:
replaceAsync
in classRemoteCacheSupport<K,
V> - Parameters:
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- Returns:
- a future containing a boolean, indicating whether the entry was replaced or not
-
replaceAsync
public CompletableFuture<V> replaceAsync(K key, V value, long lifespan, TimeUnit lifespanUnit, long maxIdle, TimeUnit maxIdleUnit) Description copied from interface:AsyncCache
Asynchronous version ofBasicCache.replace(Object, Object, long, TimeUnit, long, TimeUnit)
. This method does not block on remote calls, even if your cache mode is synchronous.- Specified by:
replaceAsync
in interfaceAsyncCache<K,
V> - Specified by:
replaceAsync
in classRemoteCacheSupport<K,
V> - Parameters:
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- Returns:
- a future containing the previous value overwritten
-
getAsync
Description copied from interface:AsyncCache
Asynchronous version ofMap.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 toMap.get(Object)
.- Specified by:
getAsync
in interfaceAsyncCache<K,
V> - Specified by:
getAsync
in classRemoteCacheSupport<K,
V> - Parameters:
key
- key to retrieve- Returns:
- a future that can be used to retrieve value associated with the
key when this is available. The actual value returned by the future
follows the same rules as
Map.get(Object)
-
getWithMetadataAsync
Description copied from interface:RemoteCache
Asynchronously returns theMetadataValue
associated to the supplied key param, or null if it doesn't exist.- Specified by:
getWithMetadataAsync
in interfaceRemoteCache<K,
V> - Specified by:
getWithMetadataAsync
in classRemoteCacheSupport<K,
V>
-
getWithMetadataAsync
public org.infinispan.client.hotrod.impl.operations.RetryAwareCompletionStage<MetadataValue<V>> getWithMetadataAsync(K key, SocketAddress preferredAddres) - Specified by:
getWithMetadataAsync
in interfaceInternalRemoteCache<K,
V>
-
isEmpty
public boolean isEmpty() -
containsValue
- Specified by:
containsValue
in interfaceMap<K,
V>
-
keySet
Description copied from interface:RemoteCache
This method is identical toRemoteCache.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.- Specified by:
keySet
in interfaceRemoteCache<K,
V> - Parameters:
segments
- the segments of keys to return - null means all available- Returns:
- set containing keys that map to the given segments
- See Also:
-
values
Description copied from interface:RemoteCache
This method is identical toRemoteCache.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.- Specified by:
values
in interfaceRemoteCache<K,
V> - Parameters:
segments
- the segments of values to return - null means all available- Returns:
- collection containing values that map to the given segments
- See Also:
-
entrySet
Description copied from interface:RemoteCache
This method is identical toRemoteCache.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.- Specified by:
entrySet
in interfaceRemoteCache<K,
V> - Parameters:
segments
- the segments of entries to return - null means all available- Returns:
- set containing entries that map to the given segments
- See Also:
-
containsKeyAsync
Description copied from interface:AsyncCache
Asynchronous version ofMap.containsKey(Object)
- Specified by:
containsKeyAsync
in interfaceAsyncCache<K,
V> - Specified by:
containsKeyAsync
in classRemoteCacheSupport<K,
V> - Parameters:
key
- key to retrieve- Returns:
- future containing true if the mapping exists.
-
putAsync
public CompletableFuture<V> putAsync(K key, V value, long lifespan, TimeUnit lifespanUnit, long maxIdle, TimeUnit maxIdleUnit) Description copied from interface:AsyncCache
Asynchronous version ofBasicCache.put(Object, Object, long, TimeUnit, long, TimeUnit)
. This method does not block on remote calls, even if your cache mode is synchronous.- Specified by:
putAsync
in interfaceAsyncCache<K,
V> - Specified by:
putAsync
in classRemoteCacheSupport<K,
V> - Parameters:
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- Returns:
- a future containing the old value replaced
-
replaceWithVersionAsync
public CompletableFuture<Boolean> replaceWithVersionAsync(K key, V newValue, long version, long lifespanSeconds, TimeUnit lifespanTimeUnit, long maxIdle, TimeUnit maxIdleTimeUnit) - Specified by:
replaceWithVersionAsync
in interfaceRemoteCache<K,
V> - See Also:
-
retrieveEntries
public CloseableIterator<Map.Entry<Object,Object>> retrieveEntries(String filterConverterFactory, Object[] filterConverterParams, Set<Integer> segments, int batchSize) Description copied from interface:RemoteCache
Retrieve entries from the server.- Specified by:
retrieveEntries
in interfaceRemoteCache<K,
V> - Parameters:
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.- Returns:
- Iterator for the entries
-
publishEntries
public <E> org.reactivestreams.Publisher<Map.Entry<K,E>> publishEntries(String filterConverterFactory, Object[] filterConverterParams, Set<Integer> segments, int batchSize) Description copied from interface:RemoteCache
Publishes the entries from the server in a non blocking fashion.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.
- Specified by:
publishEntries
in interfaceRemoteCache<K,
V> - Parameters:
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.- Returns:
- Publisher for the entries
-
retrieveEntriesByQuery
public CloseableIterator<Map.Entry<Object,Object>> retrieveEntriesByQuery(Query<?> filterQuery, Set<Integer> segments, int batchSize) Description copied from interface:RemoteCache
Retrieve entries from the server matching a query.- Specified by:
retrieveEntriesByQuery
in interfaceRemoteCache<K,
V> - Parameters:
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.- Returns:
CloseableIterator
-
publishEntriesByQuery
public <E> org.reactivestreams.Publisher<Map.Entry<K,E>> publishEntriesByQuery(Query<?> filterQuery, Set<Integer> segments, int batchSize) Description copied from interface:RemoteCache
Publish entries from the server matching a query.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.
- Specified by:
publishEntriesByQuery
in interfaceRemoteCache<K,
V> - Parameters:
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.- Returns:
- Publisher containing matching entries
-
retrieveEntriesWithMetadata
public CloseableIterator<Map.Entry<Object,MetadataValue<Object>>> retrieveEntriesWithMetadata(Set<Integer> segments, int batchSize) Description copied from interface:RemoteCache
Retrieve entries with metadata information- Specified by:
retrieveEntriesWithMetadata
in interfaceRemoteCache<K,
V>
-
publishEntriesWithMetadata
public org.reactivestreams.Publisher<Map.Entry<K,MetadataValue<V>>> publishEntriesWithMetadata(Set<Integer> segments, int batchSize) Description copied from interface:RemoteCache
Publish entries with metadata informationAny 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.
- Specified by:
publishEntriesWithMetadata
in interfaceRemoteCache<K,
V> - Parameters:
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.- Returns:
- Publisher containing entries along with metadata
-
removeAsync
Description copied from interface:AsyncCache
Asynchronous version ofBasicCache.remove(Object)
. This method does not block on remote calls, even if your cache mode is synchronous.- Specified by:
removeAsync
in interfaceAsyncCache<K,
V> - Specified by:
removeAsync
in classRemoteCacheSupport<K,
V> - Parameters:
key
- key to remove- Returns:
- a future containing the value removed
-
removeAsync
Description copied from interface:AsyncCache
Asynchronous version ofConcurrentMap.remove(Object, Object)
. This method does not block on remote calls, even if your cache mode is synchronous.- Specified by:
removeAsync
in interfaceAsyncCache<K,
V> - Specified by:
removeAsync
in classRemoteCacheSupport<K,
V> - Parameters:
key
- key to removevalue
- value to match on- Returns:
- a future containing a boolean, indicating whether the entry was removed or not
-
removeWithVersionAsync
- Specified by:
removeWithVersionAsync
in interfaceRemoteCache<K,
V> - Specified by:
removeWithVersionAsync
in classRemoteCacheSupport<K,
V> - See Also:
-
mergeAsync
public CompletableFuture<V> mergeAsync(K key, V value, BiFunction<? super V, ? super V, ? extends V> remappingFunction, long lifespan, TimeUnit lifespanUnit, long maxIdleTime, TimeUnit maxIdleTimeUnit) Description copied from interface:AsyncCache
Asynchronous version ofBasicCache.merge(Object, Object, BiFunction, long, TimeUnit, long, TimeUnit)
. This method does not block on remote calls, even if your cache mode is synchronous.- Specified by:
mergeAsync
in interfaceAsyncCache<K,
V> - Specified by:
mergeAsync
in classRemoteCacheSupport<K,
V>
-
computeAsync
public CompletableFuture<V> computeAsync(K key, BiFunction<? super K, ? super V, ? extends V> remappingFunction, long lifespan, TimeUnit lifespanUnit, long maxIdle, TimeUnit maxIdleUnit) Description copied from interface:AsyncCache
Asynchronous version ofBasicCache.compute(Object, BiFunction, long, TimeUnit, long, TimeUnit)
. This method does not block on remote calls, even if your cache mode is synchronous.- Specified by:
computeAsync
in interfaceAsyncCache<K,
V> - Specified by:
computeAsync
in classRemoteCacheSupport<K,
V>
-
computeIfAbsentAsync
public CompletableFuture<V> computeIfAbsentAsync(K key, Function<? super K, ? extends V> mappingFunction, long lifespan, TimeUnit lifespanUnit, long maxIdle, TimeUnit maxIdleUnit) Description copied from interface:AsyncCache
Asynchronous version ofBasicCache.computeIfAbsent(Object, Function, long, TimeUnit, long, TimeUnit)
. This method does not block on remote calls, even if your cache mode is synchronous.- Specified by:
computeIfAbsentAsync
in interfaceAsyncCache<K,
V> - Specified by:
computeIfAbsentAsync
in classRemoteCacheSupport<K,
V>
-
computeIfPresentAsync
public CompletableFuture<V> computeIfPresentAsync(K key, BiFunction<? super K, ? super V, ? extends V> remappingFunction, long lifespan, TimeUnit lifespanUnit, long maxIdle, TimeUnit maxIdleUnit) Description copied from interface:AsyncCache
Asynchronous version ofBasicCache.computeIfPresent(Object, BiFunction, long, TimeUnit, long, TimeUnit)
. This method does not block on remote calls, even if your cache mode is synchronous.- Specified by:
computeIfPresentAsync
in interfaceAsyncCache<K,
V> - Specified by:
computeIfPresentAsync
in classRemoteCacheSupport<K,
V>
-
replaceAll
- Specified by:
replaceAll
in interfaceConcurrentMap<K,
V> - Specified by:
replaceAll
in interfaceMap<K,
V> - Specified by:
replaceAll
in classRemoteCacheSupport<K,
V>
-
sizeAsync
Description copied from interface:AsyncCache
Asynchronous version ofMap.size()
. This method does not block on remote calls, even if your cache mode is synchronous.- Specified by:
sizeAsync
in interfaceAsyncCache<K,
V> - Specified by:
sizeAsync
in classRemoteCacheSupport<K,
V> - Returns:
- a future containing the count of the cache
-
getName
Description copied from interface:BasicCache
Retrieves the name of the cache- Specified by:
getName
in interfaceBasicCache<K,
V> - Returns:
- the name of the cache
-
getVersion
Description copied from interface:BasicCache
Retrieves the version of Infinispan- Specified by:
getVersion
in interfaceBasicCache<K,
V> - Returns:
- a version string
-
start
public void start()Description copied from interface:Lifecycle
Invoked on component start -
stop
public void stop()Description copied from interface:Lifecycle
Invoked on component stop -
keyIterator
- Specified by:
keyIterator
in interfaceInternalRemoteCache<K,
V>
-
entryIterator
- Specified by:
entryIterator
in interfaceInternalRemoteCache<K,
V>
-
hasForceReturnFlag
public boolean hasForceReturnFlag()- Specified by:
hasForceReturnFlag
in interfaceInternalRemoteCache<K,
V>
-
resolveStorage
public void resolveStorage(boolean objectStorage) - Specified by:
resolveStorage
in interfaceInternalRemoteCache<K,
V>
-
keyToBytes
- Specified by:
keyToBytes
in interfaceInternalRemoteCache<K,
V>
-
init
public void init(org.infinispan.client.hotrod.impl.operations.OperationsFactory operationsFactory, Configuration configuration, ObjectName jmxParent) - Specified by:
init
in interfaceInternalRemoteCache<K,
V>
-
init
public void init(org.infinispan.client.hotrod.impl.operations.OperationsFactory operationsFactory, Configuration configuration) - Specified by:
init
in interfaceInternalRemoteCache<K,
V>
-
getOperationsFactory
public org.infinispan.client.hotrod.impl.operations.OperationsFactory getOperationsFactory()- Specified by:
getOperationsFactory
in interfaceInternalRemoteCache<K,
V>
-
isObjectStorage
public boolean isObjectStorage()- Specified by:
isObjectStorage
in interfaceInternalRemoteCache<K,
V>
-
ping
- Specified by:
ping
in interfaceInternalRemoteCache<K,
V>
-
updateBloomFilter
Description copied from interface:InternalRemoteCache
Sends the current bloom filter to the listener node where a near cache listener is installed. If this cache does not have near caching this will return an already completed stage.- Specified by:
updateBloomFilter
in interfaceInternalRemoteCache<K,
V> - Returns:
- stage that when complete the filter was sent to the listener node
-