Class InvalidatedNearRemoteCache<K,V>
- java.lang.Object
-
- org.infinispan.client.hotrod.impl.RemoteCacheSupport<K,V>
-
- org.infinispan.client.hotrod.impl.DelegatingRemoteCache<K,V>
-
- org.infinispan.client.hotrod.impl.InvalidatedNearRemoteCache<K,V>
-
- Type Parameters:
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
public class InvalidatedNearRemoteCache<K,V> extends DelegatingRemoteCache<K,V>
NearRemoteCacheimplementation enabling
-
-
Field Summary
-
Fields inherited from class org.infinispan.client.hotrod.impl.DelegatingRemoteCache
delegate
-
Fields inherited from class org.infinispan.client.hotrod.impl.RemoteCacheSupport
defaultLifespan, defaultMaxIdleTime
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.CompletableFuture<Void>clearAsync()voidclearNearCache()static <K,V>
InvalidatedNearRemoteCache<K,V>delegatingNearCache(RemoteCacheImpl<K,V> remoteCache, NearCacheService<K,V> nearCacheService)CompletableFuture<V>getAsync(Object key)SocketAddressgetBloomListenerAddress()CompletableFuture<MetadataValue<V>>getWithMetadataAsync(K key)Asynchronously returns theMetadataValueassociated to the supplied key param, or null if it doesn't exist.CompletableFuture<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>removeAsync(Object key)CompletableFuture<Boolean>removeWithVersionAsync(K key, long version)CompletableFuture<V>replaceAsync(K key, V value, long lifespan, TimeUnit lifespanUnit, long maxIdleTime, TimeUnit maxIdleTimeUnit)CompletableFuture<Boolean>replaceWithVersionAsync(K key, V newValue, long version, long lifespan, TimeUnit lifespanTimeUnit, long maxIdleTime, TimeUnit maxIdleTimeUnit)voidsetBloomListenerAddress(SocketAddress socketAddress)voidstart()voidstop()CompletionStage<Void>updateBloomFilter()Sends the current bloom filter to the listener node where a near cache listener is installed.-
Methods inherited from class org.infinispan.client.hotrod.impl.DelegatingRemoteCache
addClientListener, addClientListener, clientStatistics, computeAsync, computeIfAbsentAsync, computeIfPresentAsync, containsKeyAsync, containsValue, entryIterator, entrySet, execute, getAllAsync, getCacheTopologyInfo, getDataFormat, getListeners, getName, getOperationsFactory, getProtocolVersion, getRemoteCacheContainer, getVersion, getWithMetadataAsync, hasForceReturnFlag, init, init, isEmpty, isObjectStorage, isTransactional, keyAsObjectIfNeeded, keyIterator, keySet, keyToBytes, mergeAsync, ping, publishEntries, publishEntriesByQuery, publishEntriesWithMetadata, putIfAbsentAsync, removeAsync, removeClientListener, replaceAll, replaceAsync, resolveStorage, retrieveEntries, retrieveEntriesByQuery, retrieveEntriesWithMetadata, serverStatistics, serverStatisticsAsync, sizeAsync, streaming, values, withDataFormat, withFlags
-
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
-
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
-
-
-
-
Method Detail
-
delegatingNearCache
public static <K,V> InvalidatedNearRemoteCache<K,V> delegatingNearCache(RemoteCacheImpl<K,V> remoteCache, NearCacheService<K,V> nearCacheService)
-
getAsync
public CompletableFuture<V> getAsync(Object key)
-
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>- Overrides:
getWithMetadataAsyncin classDelegatingRemoteCache<K,V>
-
putAsync
public CompletableFuture<V> putAsync(K key, V value, long lifespan, TimeUnit lifespanUnit, long maxIdleTime, TimeUnit maxIdleTimeUnit)
-
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>- Overrides:
putAllAsyncin classDelegatingRemoteCache<K,V>- See Also:
RemoteCache.putAll(java.util.Map, long, java.util.concurrent.TimeUnit)
-
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>- Overrides:
replaceAsyncin classDelegatingRemoteCache<K,V>
-
replaceWithVersionAsync
public CompletableFuture<Boolean> replaceWithVersionAsync(K key, V newValue, long version, long lifespan, TimeUnit lifespanTimeUnit, long maxIdleTime, TimeUnit maxIdleTimeUnit)
- Specified by:
replaceWithVersionAsyncin interfaceRemoteCache<K,V>- Overrides:
replaceWithVersionAsyncin classDelegatingRemoteCache<K,V>- See Also:
RemoteCache.replaceWithVersion(Object, Object, long)
-
removeAsync
public CompletableFuture<V> removeAsync(Object key)
- Specified by:
removeAsyncin interfaceorg.infinispan.commons.api.AsyncCache<K,V>- Overrides:
removeAsyncin classDelegatingRemoteCache<K,V>
-
removeWithVersionAsync
public CompletableFuture<Boolean> removeWithVersionAsync(K key, long version)
- Specified by:
removeWithVersionAsyncin interfaceRemoteCache<K,V>- Overrides:
removeWithVersionAsyncin classDelegatingRemoteCache<K,V>- See Also:
RemoteCache.remove(Object, Object)
-
clearAsync
public CompletableFuture<Void> clearAsync()
- Specified by:
clearAsyncin interfaceorg.infinispan.commons.api.AsyncCache<K,V>- Overrides:
clearAsyncin classDelegatingRemoteCache<K,V>
-
start
public void start()
- Specified by:
startin interfaceorg.infinispan.commons.api.Lifecycle- Overrides:
startin classDelegatingRemoteCache<K,V>
-
stop
public void stop()
- Specified by:
stopin interfaceorg.infinispan.commons.api.Lifecycle- Overrides:
stopin classDelegatingRemoteCache<K,V>
-
clearNearCache
public void clearNearCache()
-
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>- Overrides:
updateBloomFilterin classDelegatingRemoteCache<K,V>- Returns:
- stage that when complete the filter was sent to the listener node
-
getBloomListenerAddress
public SocketAddress getBloomListenerAddress()
-
setBloomListenerAddress
public void setBloomListenerAddress(SocketAddress socketAddress)
-
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>- Overrides:
addNearCacheListenerin classDelegatingRemoteCache<K,V>
-
-