Class RemoteCacheImpl<K,V>
- java.lang.Object
-
- org.infinispan.client.hotrod.impl.RemoteCacheSupport<K,V>
-
- org.infinispan.client.hotrod.impl.RemoteCacheImpl<K,V>
-
- All Implemented Interfaces:
ConcurrentMap<K,V>,Map<K,V>,InternalRemoteCache<K,V>,RemoteCache<K,V>,org.infinispan.commons.api.AsyncCache<K,V>,org.infinispan.commons.api.BasicCache<K,V>,org.infinispan.commons.api.Lifecycle,org.infinispan.commons.api.TransactionalCache
- Direct Known Subclasses:
TransactionalRemoteCacheImpl
public class RemoteCacheImpl<K,V> extends RemoteCacheSupport<K,V> implements InternalRemoteCache<K,V>
- Since:
- 4.1
- Author:
- Mircea.Markus@jboss.com
-
-
Field Summary
Fields Modifier and Type Field Description protected ClientStatisticsclientStatisticsprotected OperationsFactoryoperationsFactory-
Fields inherited from class org.infinispan.client.hotrod.impl.RemoteCacheSupport
defaultLifespan, defaultMaxIdleTime
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedRemoteCacheImpl(RemoteCacheManager rcm, String name, ClientStatistics clientStatistics)RemoteCacheImpl(RemoteCacheManager rcm, String name, org.infinispan.commons.time.TimeService timeService)RemoteCacheImpl(RemoteCacheManager rcm, String name, org.infinispan.commons.time.TimeService timeService, NearCacheService<K,V> nearCacheService)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddClientListener(Object listener)Add a client listener to receive events that happen in the remote cache.voidaddClientListener(Object listener, Object[] filterFactoryParams, Object[] converterFactoryParams)Add a client listener to receive events that happen in the remote cache.SocketAddressaddNearCacheListener(Object listener, int bloomBits)Add a client listener to handle near cache with bloom filter optimization The listener object must be annotated with @ClientListenerannotation.protected voidassertRemoteCacheManagerIsStarted()CompletableFuture<Void>clearAsync()ClientStatisticsclientStatistics()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)CompletableFuture<V>computeIfAbsentAsync(K key, Function<? super K,? extends V> mappingFunction, long lifespan, TimeUnit lifespanUnit, long maxIdle, TimeUnit maxIdleUnit)CompletableFuture<V>computeIfPresentAsync(K key, BiFunction<? super K,? super V,? extends V> remappingFunction, long lifespan, TimeUnit lifespanUnit, long maxIdle, TimeUnit maxIdleUnit)CompletableFuture<Boolean>containsKeyAsync(K key)booleancontainsValue(Object value)org.infinispan.commons.util.CloseableIterator<Map.Entry<K,V>>entryIterator(org.infinispan.commons.util.IntSet segments)org.infinispan.commons.util.CloseableIteratorSet<Map.Entry<K,V>>entrySet(org.infinispan.commons.util.IntSet segments)This method is identical toRemoteCache.entrySet()except that it will only return entries that map to the given segments.<T> Texecute(String taskName, Map<String,?> params)Executes a remote task passing a set of named parameters<T> Texecute(String taskName, Map<String,?> params, Object key)Executes a remote task passing a set of named parameters, hinting that the task should be executed on the server that is expected to store given key.CompletableFuture<Map<K,V>>getAllAsync(Set<?> keys)CompletableFuture<V>getAsync(Object key)CacheTopologyInfogetCacheTopologyInfo()ReturnsCacheTopologyInfofor this cache.DataFormatgetDataFormat()Return the currentlyDataFormatbeing used.Set<Object>getListeners()Deprecated.StringgetName()OperationsFactorygetOperationsFactory()StringgetProtocolVersion()Returns the HotRod protocol version supported by this RemoteCache implementationRemoteCacheContainergetRemoteCacheContainer()Returns theRemoteCacheContainerthat created this cache.StringgetVersion()CompletableFuture<MetadataValue<V>>getWithMetadataAsync(K key)Asynchronously returns theMetadataValueassociated to the supplied key param, or null if it doesn't exist.RetryAwareCompletionStage<MetadataValue<V>>getWithMetadataAsync(K key, SocketAddress preferredAddres)booleanhasForceReturnFlag()voidinit(OperationsFactory operationsFactory, Configuration configuration)Inititalize without mbeansvoidinit(OperationsFactory operationsFactory, Configuration configuration, ObjectName jmxParent)booleanisEmpty()booleanisObjectStorage()booleanisTransactional()KkeyAsObjectIfNeeded(Object key)org.infinispan.commons.util.CloseableIterator<K>keyIterator(org.infinispan.commons.util.IntSet segments)org.infinispan.commons.util.CloseableIteratorSet<K>keySet(org.infinispan.commons.util.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)CompletableFuture<V>mergeAsync(K key, V value, BiFunction<? super V,? super V,? extends V> remappingFunction, long lifespan, TimeUnit lifespanUnit, long maxIdleTime, TimeUnit maxIdleTimeUnit)CompletionStage<PingResponse>ping()<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 informationCompletableFuture<Void>putAllAsync(Map<? extends K,? extends V> map, long lifespan, TimeUnit lifespanUnit, long maxIdleTime, TimeUnit maxIdleTimeUnit)Adds or overrides each specified entry in the remote cache.CompletableFuture<V>putAsync(K key, V value, long lifespan, TimeUnit lifespanUnit, long maxIdleTime, TimeUnit maxIdleTimeUnit)CompletableFuture<V>putIfAbsentAsync(K key, V value, long lifespan, TimeUnit lifespanUnit, long maxIdleTime, TimeUnit maxIdleTimeUnit)CompletableFuture<V>removeAsync(Object key)CompletableFuture<Boolean>removeAsync(Object key, Object value)voidremoveClientListener(Object listener)Remove a previously added client listener.CompletableFuture<Boolean>removeWithVersionAsync(K key, long version)voidreplaceAll(BiFunction<? super K,? super V,? extends V> function)CompletableFuture<V>replaceAsync(K key, V value, long lifespan, TimeUnit lifespanUnit, long maxIdleTime, TimeUnit maxIdleTimeUnit)CompletableFuture<Boolean>replaceAsync(K key, V oldValue, V newValue, long lifespan, TimeUnit lifespanUnit, long maxIdle, TimeUnit maxIdleUnit)CompletableFuture<Boolean>replaceWithVersionAsync(K key, V newValue, long version, long lifespan, TimeUnit lifespanTimeUnit, long maxIdle, TimeUnit maxIdleTimeUnit)voidresolveStorage(boolean objectStorage)org.infinispan.commons.util.CloseableIterator<Map.Entry<Object,Object>>retrieveEntries(String filterConverterFactory, Object[] filterConverterParams, Set<Integer> segments, int batchSize)Retrieve entries from the server.org.infinispan.commons.util.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.org.infinispan.commons.util.CloseableIterator<Map.Entry<Object,MetadataValue<Object>>>retrieveEntriesWithMetadata(Set<Integer> segments, int batchSize)Retrieve entries with metadata informationServerStatisticsserverStatistics()Returns server-side statistics for this cache.CompletionStage<ServerStatistics>serverStatisticsAsync()Returns server-side statistics for this cache.CompletableFuture<Long>sizeAsync()voidstart()voidstop()StreamingRemoteCache<K>streaming()Returns a cache where values are manipulated usingInputStreamandOutputStreamStringtoString()CompletionStage<Void>updateBloomFilter()Sends the current bloom filter to the listener node where a near cache listener is installed.org.infinispan.commons.util.CloseableIteratorCollection<V>values(org.infinispan.commons.util.IntSet segments)This method is identical toRemoteCache.values()except that it will only return values that map to the given segments.protected byte[]valueToBytes(Object o)<T,U>
InternalRemoteCache<T,U>withDataFormat(DataFormat newDataFormat)Return a new instance ofRemoteCacheusing the suppliedDataFormat.InternalRemoteCache<K,V>withFlags(Flag... flags)Applies one or moreFlags 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, 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
-
Methods inherited from interface org.infinispan.client.hotrod.RemoteCache
entrySet, 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
-
-
-
-
Field Detail
-
operationsFactory
protected OperationsFactory operationsFactory
-
clientStatistics
protected ClientStatistics clientStatistics
-
-
Constructor Detail
-
RemoteCacheImpl
public RemoteCacheImpl(RemoteCacheManager rcm, String name, org.infinispan.commons.time.TimeService timeService)
-
RemoteCacheImpl
public RemoteCacheImpl(RemoteCacheManager rcm, String name, org.infinispan.commons.time.TimeService timeService, NearCacheService<K,V> nearCacheService)
-
RemoteCacheImpl
protected RemoteCacheImpl(RemoteCacheManager rcm, String name, ClientStatistics clientStatistics)
-
-
Method Detail
-
init
public void init(OperationsFactory operationsFactory, Configuration configuration, ObjectName jmxParent)
- Specified by:
initin interfaceInternalRemoteCache<K,V>
-
init
public void init(OperationsFactory operationsFactory, Configuration configuration)
Inititalize without mbeans- Specified by:
initin interfaceInternalRemoteCache<K,V>
-
getOperationsFactory
public OperationsFactory getOperationsFactory()
- Specified by:
getOperationsFactoryin interfaceInternalRemoteCache<K,V>
-
getRemoteCacheContainer
public RemoteCacheContainer getRemoteCacheContainer()
Description copied from interface:RemoteCacheReturns theRemoteCacheContainerthat created this cache.- Specified by:
getRemoteCacheContainerin interfaceRemoteCache<K,V>
-
removeWithVersionAsync
public CompletableFuture<Boolean> removeWithVersionAsync(K key, long version)
- Specified by:
removeWithVersionAsyncin interfaceRemoteCache<K,V>- Specified by:
removeWithVersionAsyncin classRemoteCacheSupport<K,V>- See Also:
RemoteCache.remove(Object, Object)
-
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)
- Specified by:
mergeAsyncin interfaceorg.infinispan.commons.api.AsyncCache<K,V>- Specified by:
mergeAsyncin classRemoteCacheSupport<K,V>
-
replaceWithVersionAsync
public CompletableFuture<Boolean> replaceWithVersionAsync(K key, V newValue, long version, long lifespan, TimeUnit lifespanTimeUnit, long maxIdle, TimeUnit maxIdleTimeUnit)
- Specified by:
replaceWithVersionAsyncin interfaceRemoteCache<K,V>- See Also:
RemoteCache.replaceWithVersion(Object, Object, long)
-
retrieveEntries
public org.infinispan.commons.util.CloseableIterator<Map.Entry<Object,Object>> retrieveEntries(String filterConverterFactory, Object[] filterConverterParams, Set<Integer> segments, int batchSize)
Description copied from interface:RemoteCacheRetrieve entries from the server.- Specified by:
retrieveEntriesin 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:RemoteCachePublishes 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:
publishEntriesin 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 org.infinispan.commons.util.CloseableIterator<Map.Entry<Object,Object>> retrieveEntriesByQuery(org.infinispan.query.dsl.Query<?> filterQuery, Set<Integer> segments, int batchSize)
Description copied from interface:RemoteCacheRetrieve entries from the server matching a query.- Specified by:
retrieveEntriesByQueryin interfaceRemoteCache<K,V>- Parameters:
filterQuery-Querysegments- 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(org.infinispan.query.dsl.Query<?> filterQuery, Set<Integer> segments, int batchSize)
Description copied from interface:RemoteCachePublish 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:
publishEntriesByQueryin interfaceRemoteCache<K,V>- Parameters:
filterQuery-Querysegments- 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 org.infinispan.commons.util.CloseableIterator<Map.Entry<Object,MetadataValue<Object>>> retrieveEntriesWithMetadata(Set<Integer> segments, int batchSize)
Description copied from interface:RemoteCacheRetrieve entries with metadata information- Specified by:
retrieveEntriesWithMetadatain interfaceRemoteCache<K,V>
-
publishEntriesWithMetadata
public org.reactivestreams.Publisher<Map.Entry<K,MetadataValue<V>>> publishEntriesWithMetadata(Set<Integer> segments, int batchSize)
Description copied from interface:RemoteCachePublish 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:
publishEntriesWithMetadatain 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
-
getWithMetadataAsync
public CompletableFuture<MetadataValue<V>> getWithMetadataAsync(K key)
Description copied from interface:RemoteCacheAsynchronously returns theMetadataValueassociated to the supplied key param, or null if it doesn't exist.- Specified by:
getWithMetadataAsyncin interfaceRemoteCache<K,V>- Specified by:
getWithMetadataAsyncin classRemoteCacheSupport<K,V>
-
getWithMetadataAsync
public RetryAwareCompletionStage<MetadataValue<V>> getWithMetadataAsync(K key, SocketAddress preferredAddres)
- Specified by:
getWithMetadataAsyncin interfaceInternalRemoteCache<K,V>
-
putAllAsync
public CompletableFuture<Void> putAllAsync(Map<? extends K,? extends V> map, long lifespan, TimeUnit lifespanUnit, long maxIdleTime, TimeUnit maxIdleTimeUnit)
Description copied from interface:RemoteCacheAdds or overrides each specified entry in the remote cache. This operation provides better performance than calling put() for each entry.- Specified by:
putAllAsyncin interfaceorg.infinispan.commons.api.AsyncCache<K,V>- Specified by:
putAllAsyncin interfaceRemoteCache<K,V>- Specified by:
putAllAsyncin classRemoteCacheSupport<K,V>- See Also:
RemoteCache.putAll(java.util.Map, long, java.util.concurrent.TimeUnit)
-
sizeAsync
public CompletableFuture<Long> sizeAsync()
-
clientStatistics
public ClientStatistics clientStatistics()
Description copied from interface:RemoteCacheReturns client-side statistics for this cache.- Specified by:
clientStatisticsin interfaceInternalRemoteCache<K,V>- Specified by:
clientStatisticsin interfaceRemoteCache<K,V>
-
serverStatistics
public ServerStatistics serverStatistics()
Description copied from interface:RemoteCacheReturns server-side statistics for this cache.- Specified by:
serverStatisticsin interfaceRemoteCache<K,V>
-
serverStatisticsAsync
public CompletionStage<ServerStatistics> serverStatisticsAsync()
Description copied from interface:RemoteCacheReturns server-side statistics for this cache.- Specified by:
serverStatisticsAsyncin interfaceRemoteCache<K,V>
-
keyAsObjectIfNeeded
public K keyAsObjectIfNeeded(Object key)
- Specified by:
keyAsObjectIfNeededin interfaceInternalRemoteCache<K,V>
-
putAsync
public CompletableFuture<V> putAsync(K key, V value, long lifespan, TimeUnit lifespanUnit, long maxIdleTime, TimeUnit maxIdleTimeUnit)
-
clearAsync
public CompletableFuture<Void> clearAsync()
-
computeAsync
public CompletableFuture<V> computeAsync(K key, BiFunction<? super K,? super V,? extends V> remappingFunction, long lifespan, TimeUnit lifespanUnit, long maxIdle, TimeUnit maxIdleUnit)
- Specified by:
computeAsyncin interfaceorg.infinispan.commons.api.AsyncCache<K,V>- Specified by:
computeAsyncin classRemoteCacheSupport<K,V>
-
computeIfAbsentAsync
public CompletableFuture<V> computeIfAbsentAsync(K key, Function<? super K,? extends V> mappingFunction, long lifespan, TimeUnit lifespanUnit, long maxIdle, TimeUnit maxIdleUnit)
- Specified by:
computeIfAbsentAsyncin interfaceorg.infinispan.commons.api.AsyncCache<K,V>- Specified by:
computeIfAbsentAsyncin 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)
- Specified by:
computeIfPresentAsyncin interfaceorg.infinispan.commons.api.AsyncCache<K,V>- Specified by:
computeIfPresentAsyncin classRemoteCacheSupport<K,V>
-
replaceAll
public void replaceAll(BiFunction<? super K,? super V,? extends V> function)
- Specified by:
replaceAllin interfaceConcurrentMap<K,V>- Specified by:
replaceAllin interfaceMap<K,V>- Specified by:
replaceAllin classRemoteCacheSupport<K,V>
-
putIfAbsentAsync
public CompletableFuture<V> putIfAbsentAsync(K key, V value, long lifespan, TimeUnit lifespanUnit, long maxIdleTime, TimeUnit maxIdleTimeUnit)
- Specified by:
putIfAbsentAsyncin interfaceorg.infinispan.commons.api.AsyncCache<K,V>- Specified by:
putIfAbsentAsyncin classRemoteCacheSupport<K,V>
-
replaceAsync
public CompletableFuture<Boolean> replaceAsync(K key, V oldValue, V newValue, long lifespan, TimeUnit lifespanUnit, long maxIdle, TimeUnit maxIdleUnit)
- Specified by:
replaceAsyncin interfaceorg.infinispan.commons.api.AsyncCache<K,V>- Specified by:
replaceAsyncin classRemoteCacheSupport<K,V>
-
removeAsync
public CompletableFuture<V> removeAsync(Object key)
- Specified by:
removeAsyncin interfaceorg.infinispan.commons.api.AsyncCache<K,V>- Specified by:
removeAsyncin classRemoteCacheSupport<K,V>
-
removeAsync
public CompletableFuture<Boolean> removeAsync(Object key, Object value)
- Specified by:
removeAsyncin interfaceorg.infinispan.commons.api.AsyncCache<K,V>- Specified by:
removeAsyncin classRemoteCacheSupport<K,V>
-
replaceAsync
public CompletableFuture<V> replaceAsync(K key, V value, long lifespan, TimeUnit lifespanUnit, long maxIdleTime, TimeUnit maxIdleTimeUnit)
- Specified by:
replaceAsyncin interfaceorg.infinispan.commons.api.AsyncCache<K,V>- Specified by:
replaceAsyncin classRemoteCacheSupport<K,V>
-
containsKeyAsync
public CompletableFuture<Boolean> containsKeyAsync(K key)
- Specified by:
containsKeyAsyncin interfaceorg.infinispan.commons.api.AsyncCache<K,V>- Specified by:
containsKeyAsyncin classRemoteCacheSupport<K,V>
-
containsValue
public boolean containsValue(Object value)
- Specified by:
containsValuein interfaceMap<K,V>
-
getAllAsync
public CompletableFuture<Map<K,V>> getAllAsync(Set<?> keys)
- Specified by:
getAllAsyncin interfaceorg.infinispan.commons.api.AsyncCache<K,V>- Specified by:
getAllAsyncin classRemoteCacheSupport<K,V>
-
start
public void start()
- Specified by:
startin interfaceorg.infinispan.commons.api.Lifecycle
-
stop
public void stop()
- Specified by:
stopin interfaceorg.infinispan.commons.api.Lifecycle
-
getName
public String getName()
-
getVersion
public String getVersion()
-
getProtocolVersion
public String getProtocolVersion()
Description copied from interface:RemoteCacheReturns the HotRod protocol version supported by this RemoteCache implementation- Specified by:
getProtocolVersionin interfaceRemoteCache<K,V>
-
addClientListener
public void addClientListener(Object listener)
Description copied from interface:RemoteCacheAdd a client listener to receive events that happen in the remote cache. The listener object must be annotated with @ClientListenerannotation.- Specified by:
addClientListenerin interfaceRemoteCache<K,V>
-
addClientListener
public void addClientListener(Object listener, Object[] filterFactoryParams, Object[] converterFactoryParams)
Description copied from interface:RemoteCacheAdd a client listener to receive events that happen in the remote cache. The listener object must be annotated with @ClientListener annotation.- Specified by:
addClientListenerin interfaceRemoteCache<K,V>
-
addNearCacheListener
public SocketAddress addNearCacheListener(Object listener, int bloomBits)
Description copied from interface:InternalRemoteCacheAdd a client listener to handle near cache with bloom filter optimization The listener object must be annotated with @ClientListenerannotation.- Specified by:
addNearCacheListenerin interfaceInternalRemoteCache<K,V>
-
removeClientListener
public void removeClientListener(Object listener)
Description copied from interface:RemoteCacheRemove a previously added client listener. If the listener was not added before, this operation is a no-op.- Specified by:
removeClientListenerin interfaceRemoteCache<K,V>
-
getListeners
@Deprecated public Set<Object> getListeners()
Deprecated.Description copied from interface:RemoteCacheReturns a set with all the listeners registered by this client for the given cache.- Specified by:
getListenersin interfaceRemoteCache<K,V>
-
withFlags
public InternalRemoteCache<K,V> withFlags(Flag... flags)
Description copied from interface:RemoteCacheApplies one or moreFlags to the scope of a single invocation. See theFlagenumeration to for information on available flags. Sample usage:remoteCache.withFlags(Flag.FORCE_RETURN_VALUE).put("hello", "world");- Specified by:
withFlagsin interfaceInternalRemoteCache<K,V>- Specified by:
withFlagsin interfaceRemoteCache<K,V>- Returns:
- the current RemoteCache instance to continue running operations on.
-
getAsync
public CompletableFuture<V> getAsync(Object key)
-
ping
public CompletionStage<PingResponse> ping()
- Specified by:
pingin interfaceInternalRemoteCache<K,V>
-
keyToBytes
public byte[] keyToBytes(Object o)
- Specified by:
keyToBytesin interfaceInternalRemoteCache<K,V>
-
valueToBytes
protected byte[] valueToBytes(Object o)
-
assertRemoteCacheManagerIsStarted
protected void assertRemoteCacheManagerIsStarted()
-
keySet
public org.infinispan.commons.util.CloseableIteratorSet<K> keySet(org.infinispan.commons.util.IntSet segments)
Description copied from interface:RemoteCacheThis 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:
keySetin 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:
RemoteCache.keySet()
-
keyIterator
public org.infinispan.commons.util.CloseableIterator<K> keyIterator(org.infinispan.commons.util.IntSet segments)
- Specified by:
keyIteratorin interfaceInternalRemoteCache<K,V>
-
entrySet
public org.infinispan.commons.util.CloseableIteratorSet<Map.Entry<K,V>> entrySet(org.infinispan.commons.util.IntSet segments)
Description copied from interface:RemoteCacheThis 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:
entrySetin 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:
RemoteCache.entrySet()
-
entryIterator
public org.infinispan.commons.util.CloseableIterator<Map.Entry<K,V>> entryIterator(org.infinispan.commons.util.IntSet segments)
- Specified by:
entryIteratorin interfaceInternalRemoteCache<K,V>
-
values
public org.infinispan.commons.util.CloseableIteratorCollection<V> values(org.infinispan.commons.util.IntSet segments)
Description copied from interface:RemoteCacheThis 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:
valuesin 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:
RemoteCache.values()
-
execute
public <T> T execute(String taskName, Map<String,?> params)
Description copied from interface:RemoteCacheExecutes a remote task passing a set of named parameters- Specified by:
executein interfaceRemoteCache<K,V>
-
execute
public <T> T execute(String taskName, Map<String,?> params, Object key)
Description copied from interface:RemoteCacheExecutes a remote task passing a set of named parameters, hinting that the task should be executed on the server that is expected to store given key. The key itself is not transferred to the server.- Specified by:
executein interfaceRemoteCache<K,V>
-
getCacheTopologyInfo
public CacheTopologyInfo getCacheTopologyInfo()
Description copied from interface:RemoteCacheReturnsCacheTopologyInfofor this cache.- Specified by:
getCacheTopologyInfoin interfaceRemoteCache<K,V>
-
streaming
public StreamingRemoteCache<K> streaming()
Description copied from interface:RemoteCacheReturns a cache where values are manipulated usingInputStreamandOutputStream- Specified by:
streamingin interfaceRemoteCache<K,V>
-
withDataFormat
public <T,U> InternalRemoteCache<T,U> withDataFormat(DataFormat newDataFormat)
Description copied from interface:RemoteCacheReturn a new instance ofRemoteCacheusing the suppliedDataFormat.- Specified by:
withDataFormatin interfaceInternalRemoteCache<K,V>- Specified by:
withDataFormatin interfaceRemoteCache<K,V>
-
resolveStorage
public void resolveStorage(boolean objectStorage)
- Specified by:
resolveStoragein interfaceInternalRemoteCache<K,V>
-
getDataFormat
public DataFormat getDataFormat()
Description copied from interface:RemoteCacheReturn the currentlyDataFormatbeing used.- Specified by:
getDataFormatin interfaceRemoteCache<K,V>
-
isTransactional
public boolean isTransactional()
- Specified by:
isTransactionalin interfaceRemoteCache<K,V>- Returns:
trueif the cache can participate in a transaction,falseotherwise.
-
isObjectStorage
public boolean isObjectStorage()
- Specified by:
isObjectStoragein interfaceInternalRemoteCache<K,V>
-
hasForceReturnFlag
public boolean hasForceReturnFlag()
- Specified by:
hasForceReturnFlagin interfaceInternalRemoteCache<K,V>
-
updateBloomFilter
public CompletionStage<Void> updateBloomFilter()
Description copied from interface:InternalRemoteCacheSends 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:
updateBloomFilterin interfaceInternalRemoteCache<K,V>- Returns:
- stage that when complete the filter was sent to the listener node
-
-