Package org.infinispan.hotrod.impl.cache
Class DelegatingRemoteCache<K,V>
- java.lang.Object
-
- org.infinispan.hotrod.impl.cache.DelegatingRemoteCache<K,V>
-
- Type Parameters:
K- key typeV- value type
- All Implemented Interfaces:
AutoCloseable,RemoteCache<K,V>
- Direct Known Subclasses:
InvalidatedNearRemoteCache
public abstract class DelegatingRemoteCache<K,V> extends Object implements RemoteCache<K,V>
Delegates all invocations to the provided underlyingRemoteCachebut provides extensibility to intercept when a method is invoked.
-
-
Field Summary
Fields Modifier and Type Field Description protected RemoteCache<K,V>delegate
-
Constructor Summary
Constructors Modifier Constructor Description protectedDelegatingRemoteCache(RemoteCache<K,V> delegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SocketAddressaddNearCacheListener(Object listener, int bloomFilterBits)CompletionStage<Void>clear(org.infinispan.api.common.CacheOptions options)voidclose()CompletionStage<org.infinispan.api.configuration.CacheConfiguration>configuration()Flow.Publisher<org.infinispan.api.common.CacheEntry<K,V>>entries(org.infinispan.api.common.CacheOptions options)CompletionStage<Long>estimateSize(org.infinispan.api.common.CacheOptions options)CompletionStage<V>get(K key, org.infinispan.api.common.CacheOptions options)Flow.Publisher<org.infinispan.api.common.CacheEntry<K,V>>getAll(Set<K> keys, org.infinispan.api.common.CacheOptions options)Flow.Publisher<org.infinispan.api.common.CacheEntry<K,V>>getAll(org.infinispan.api.common.CacheOptions options, K[] keys)CompletionStage<org.infinispan.api.common.CacheEntry<K,V>>getAndRemove(K key, org.infinispan.api.common.CacheOptions options)Flow.Publisher<org.infinispan.api.common.CacheEntry<K,V>>getAndRemoveAll(Flow.Publisher<K> keys, org.infinispan.api.common.CacheWriteOptions options)Flow.Publisher<org.infinispan.api.common.CacheEntry<K,V>>getAndRemoveAll(Set<K> keys, org.infinispan.api.common.CacheWriteOptions options)DataFormatgetDataFormat()CompletionStage<org.infinispan.api.common.CacheEntry<K,V>>getEntry(K key, org.infinispan.api.common.CacheOptions options)RetryAwareCompletionStage<org.infinispan.api.common.CacheEntry<K,V>>getEntry(K key, org.infinispan.api.common.CacheOptions options, SocketAddress listenerAddress)HotRodTransportgetHotRodTransport()StringgetName()CacheOperationsFactorygetOperationsFactory()CompletionStage<org.infinispan.api.common.CacheEntry<K,V>>getOrReplaceEntry(K key, V value, org.infinispan.api.common.CacheEntryVersion version, org.infinispan.api.common.CacheWriteOptions options)javax.transaction.TransactionManagergetTransactionManager()booleanisTransactional()KkeyAsObjectIfNeeded(Object key)Flow.Publisher<K>keys(org.infinispan.api.common.CacheOptions options)byte[]keyToBytes(Object o)Flow.Publisher<org.infinispan.api.common.events.cache.CacheEntryEvent<K,V>>listen(org.infinispan.api.common.events.cache.CacheListenerOptions options, org.infinispan.api.common.events.cache.CacheEntryEventType[] types)<T> Flow.Publisher<org.infinispan.api.common.process.CacheEntryProcessorResult<K,T>>process(Set<K> keys, org.infinispan.api.async.AsyncCacheEntryProcessor<K,V,T> task, org.infinispan.api.common.CacheOptions options)<T> Flow.Publisher<org.infinispan.api.common.process.CacheEntryProcessorResult<K,T>>processAll(org.infinispan.api.async.AsyncCacheEntryProcessor<K,V,T> processor, org.infinispan.api.common.process.CacheProcessorOptions options)<E> org.reactivestreams.Publisher<org.infinispan.api.common.CacheEntry<K,E>>publishEntries(String filterConverterFactory, Object[] filterConverterParams, Set<Integer> segments, int batchSize)<E> org.reactivestreams.Publisher<org.infinispan.api.common.CacheEntry<K,E>>publishEntriesByQuery(RemoteQuery query, Set<Integer> segments, int batchSize)org.reactivestreams.Publisher<org.infinispan.api.common.CacheEntry<K,V>>publishEntriesWithMetadata(Set<Integer> segments, int batchSize)CompletionStage<org.infinispan.api.common.CacheEntry<K,V>>put(K key, V value, org.infinispan.api.common.CacheWriteOptions options)CompletionStage<Void>putAll(Flow.Publisher<org.infinispan.api.common.CacheEntry<K,V>> entries, org.infinispan.api.common.CacheWriteOptions options)CompletionStage<Void>putAll(Map<K,V> entries, org.infinispan.api.common.CacheWriteOptions options)CompletionStage<org.infinispan.api.common.CacheEntry<K,V>>putIfAbsent(K key, V value, org.infinispan.api.common.CacheWriteOptions options)CompletionStage<Boolean>remove(K key, org.infinispan.api.common.CacheEntryVersion version, org.infinispan.api.common.CacheOptions options)CompletionStage<Boolean>remove(K key, org.infinispan.api.common.CacheOptions options)Flow.Publisher<K>removeAll(Flow.Publisher<K> keys, org.infinispan.api.common.CacheWriteOptions options)Flow.Publisher<K>removeAll(Set<K> keys, org.infinispan.api.common.CacheWriteOptions options)CompletionStage<Boolean>replace(K key, V value, org.infinispan.api.common.CacheEntryVersion version, org.infinispan.api.common.CacheWriteOptions options)voidresolveStorage(boolean objectStorage)org.infinispan.commons.util.CloseableIterator<org.infinispan.api.common.CacheEntry<Object,Object>>retrieveEntries(String filterConverterFactory, Object[] filterConverterParams, Set<Integer> segments, int batchSize)org.infinispan.commons.util.CloseableIterator<org.infinispan.api.common.CacheEntry<Object,Object>>retrieveEntries(String filterConverterFactory, Set<Integer> segments, int batchSize)org.infinispan.commons.util.CloseableIterator<org.infinispan.api.common.CacheEntry<Object,Object>>retrieveEntriesByQuery(RemoteQuery query, Set<Integer> segments, int batchSize)org.infinispan.commons.util.CloseableIterator<org.infinispan.api.common.CacheEntry<Object,Object>>retrieveEntriesWithMetadata(Set<Integer> segments, int batchSize)CompletionStage<Void>set(K key, V value, org.infinispan.api.common.CacheWriteOptions options)CompletionStage<Boolean>setIfAbsent(K key, V value, org.infinispan.api.common.CacheWriteOptions options)CompletionStage<Void>updateBloomFilter()byte[]valueToBytes(Object o)<T,U>
RemoteCache<T,U>withDataFormat(DataFormat newDataFormat)
-
-
-
Field Detail
-
delegate
protected final RemoteCache<K,V> delegate
-
-
Constructor Detail
-
DelegatingRemoteCache
protected DelegatingRemoteCache(RemoteCache<K,V> delegate)
-
-
Method Detail
-
configuration
public CompletionStage<org.infinispan.api.configuration.CacheConfiguration> configuration()
- Specified by:
configurationin interfaceRemoteCache<K,V>
-
getHotRodTransport
public HotRodTransport getHotRodTransport()
- Specified by:
getHotRodTransportin interfaceRemoteCache<K,V>
-
getOperationsFactory
public CacheOperationsFactory getOperationsFactory()
- Specified by:
getOperationsFactoryin interfaceRemoteCache<K,V>
-
get
public CompletionStage<V> get(K key, org.infinispan.api.common.CacheOptions options)
- Specified by:
getin interfaceRemoteCache<K,V>
-
getEntry
public CompletionStage<org.infinispan.api.common.CacheEntry<K,V>> getEntry(K key, org.infinispan.api.common.CacheOptions options)
- Specified by:
getEntryin interfaceRemoteCache<K,V>
-
getEntry
public RetryAwareCompletionStage<org.infinispan.api.common.CacheEntry<K,V>> getEntry(K key, org.infinispan.api.common.CacheOptions options, SocketAddress listenerAddress)
- Specified by:
getEntryin interfaceRemoteCache<K,V>
-
putIfAbsent
public CompletionStage<org.infinispan.api.common.CacheEntry<K,V>> putIfAbsent(K key, V value, org.infinispan.api.common.CacheWriteOptions options)
- Specified by:
putIfAbsentin interfaceRemoteCache<K,V>
-
setIfAbsent
public CompletionStage<Boolean> setIfAbsent(K key, V value, org.infinispan.api.common.CacheWriteOptions options)
- Specified by:
setIfAbsentin interfaceRemoteCache<K,V>
-
put
public CompletionStage<org.infinispan.api.common.CacheEntry<K,V>> put(K key, V value, org.infinispan.api.common.CacheWriteOptions options)
- Specified by:
putin interfaceRemoteCache<K,V>
-
set
public CompletionStage<Void> set(K key, V value, org.infinispan.api.common.CacheWriteOptions options)
- Specified by:
setin interfaceRemoteCache<K,V>
-
replace
public CompletionStage<Boolean> replace(K key, V value, org.infinispan.api.common.CacheEntryVersion version, org.infinispan.api.common.CacheWriteOptions options)
- Specified by:
replacein interfaceRemoteCache<K,V>
-
getOrReplaceEntry
public CompletionStage<org.infinispan.api.common.CacheEntry<K,V>> getOrReplaceEntry(K key, V value, org.infinispan.api.common.CacheEntryVersion version, org.infinispan.api.common.CacheWriteOptions options)
- Specified by:
getOrReplaceEntryin interfaceRemoteCache<K,V>
-
remove
public CompletionStage<Boolean> remove(K key, org.infinispan.api.common.CacheOptions options)
- Specified by:
removein interfaceRemoteCache<K,V>
-
remove
public CompletionStage<Boolean> remove(K key, org.infinispan.api.common.CacheEntryVersion version, org.infinispan.api.common.CacheOptions options)
- Specified by:
removein interfaceRemoteCache<K,V>
-
getAndRemove
public CompletionStage<org.infinispan.api.common.CacheEntry<K,V>> getAndRemove(K key, org.infinispan.api.common.CacheOptions options)
- Specified by:
getAndRemovein interfaceRemoteCache<K,V>
-
keys
public Flow.Publisher<K> keys(org.infinispan.api.common.CacheOptions options)
- Specified by:
keysin interfaceRemoteCache<K,V>
-
entries
public Flow.Publisher<org.infinispan.api.common.CacheEntry<K,V>> entries(org.infinispan.api.common.CacheOptions options)
- Specified by:
entriesin interfaceRemoteCache<K,V>
-
putAll
public CompletionStage<Void> putAll(Map<K,V> entries, org.infinispan.api.common.CacheWriteOptions options)
- Specified by:
putAllin interfaceRemoteCache<K,V>
-
putAll
public CompletionStage<Void> putAll(Flow.Publisher<org.infinispan.api.common.CacheEntry<K,V>> entries, org.infinispan.api.common.CacheWriteOptions options)
- Specified by:
putAllin interfaceRemoteCache<K,V>
-
getAll
public Flow.Publisher<org.infinispan.api.common.CacheEntry<K,V>> getAll(Set<K> keys, org.infinispan.api.common.CacheOptions options)
- Specified by:
getAllin interfaceRemoteCache<K,V>
-
getAll
public Flow.Publisher<org.infinispan.api.common.CacheEntry<K,V>> getAll(org.infinispan.api.common.CacheOptions options, K[] keys)
- Specified by:
getAllin interfaceRemoteCache<K,V>
-
removeAll
public Flow.Publisher<K> removeAll(Set<K> keys, org.infinispan.api.common.CacheWriteOptions options)
- Specified by:
removeAllin interfaceRemoteCache<K,V>
-
removeAll
public Flow.Publisher<K> removeAll(Flow.Publisher<K> keys, org.infinispan.api.common.CacheWriteOptions options)
- Specified by:
removeAllin interfaceRemoteCache<K,V>
-
getAndRemoveAll
public Flow.Publisher<org.infinispan.api.common.CacheEntry<K,V>> getAndRemoveAll(Set<K> keys, org.infinispan.api.common.CacheWriteOptions options)
- Specified by:
getAndRemoveAllin interfaceRemoteCache<K,V>
-
getAndRemoveAll
public Flow.Publisher<org.infinispan.api.common.CacheEntry<K,V>> getAndRemoveAll(Flow.Publisher<K> keys, org.infinispan.api.common.CacheWriteOptions options)
- Specified by:
getAndRemoveAllin interfaceRemoteCache<K,V>
-
estimateSize
public CompletionStage<Long> estimateSize(org.infinispan.api.common.CacheOptions options)
- Specified by:
estimateSizein interfaceRemoteCache<K,V>
-
clear
public CompletionStage<Void> clear(org.infinispan.api.common.CacheOptions options)
- Specified by:
clearin interfaceRemoteCache<K,V>
-
retrieveEntries
public org.infinispan.commons.util.CloseableIterator<org.infinispan.api.common.CacheEntry<Object,Object>> retrieveEntries(String filterConverterFactory, Set<Integer> segments, int batchSize)
- Specified by:
retrieveEntriesin interfaceRemoteCache<K,V>
-
retrieveEntries
public org.infinispan.commons.util.CloseableIterator<org.infinispan.api.common.CacheEntry<Object,Object>> retrieveEntries(String filterConverterFactory, Object[] filterConverterParams, Set<Integer> segments, int batchSize)
- Specified by:
retrieveEntriesin interfaceRemoteCache<K,V>
-
listen
public Flow.Publisher<org.infinispan.api.common.events.cache.CacheEntryEvent<K,V>> listen(org.infinispan.api.common.events.cache.CacheListenerOptions options, org.infinispan.api.common.events.cache.CacheEntryEventType[] types)
- Specified by:
listenin interfaceRemoteCache<K,V>
-
process
public <T> Flow.Publisher<org.infinispan.api.common.process.CacheEntryProcessorResult<K,T>> process(Set<K> keys, org.infinispan.api.async.AsyncCacheEntryProcessor<K,V,T> task, org.infinispan.api.common.CacheOptions options)
- Specified by:
processin interfaceRemoteCache<K,V>
-
processAll
public <T> Flow.Publisher<org.infinispan.api.common.process.CacheEntryProcessorResult<K,T>> processAll(org.infinispan.api.async.AsyncCacheEntryProcessor<K,V,T> processor, org.infinispan.api.common.process.CacheProcessorOptions options)
- Specified by:
processAllin interfaceRemoteCache<K,V>
-
withDataFormat
public <T,U> RemoteCache<T,U> withDataFormat(DataFormat newDataFormat)
- Specified by:
withDataFormatin interfaceRemoteCache<K,V>
-
keyAsObjectIfNeeded
public K keyAsObjectIfNeeded(Object key)
- Specified by:
keyAsObjectIfNeededin interfaceRemoteCache<K,V>
-
keyToBytes
public byte[] keyToBytes(Object o)
- Specified by:
keyToBytesin interfaceRemoteCache<K,V>
-
valueToBytes
public byte[] valueToBytes(Object o)
- Specified by:
valueToBytesin interfaceRemoteCache<K,V>
-
resolveStorage
public void resolveStorage(boolean objectStorage)
- Specified by:
resolveStoragein interfaceRemoteCache<K,V>
-
updateBloomFilter
public CompletionStage<Void> updateBloomFilter()
- Specified by:
updateBloomFilterin interfaceRemoteCache<K,V>
-
addNearCacheListener
public SocketAddress addNearCacheListener(Object listener, int bloomFilterBits)
- Specified by:
addNearCacheListenerin interfaceRemoteCache<K,V>
-
getName
public String getName()
- Specified by:
getNamein interfaceRemoteCache<K,V>
-
getDataFormat
public DataFormat getDataFormat()
- Specified by:
getDataFormatin interfaceRemoteCache<K,V>
-
publishEntries
public <E> org.reactivestreams.Publisher<org.infinispan.api.common.CacheEntry<K,E>> publishEntries(String filterConverterFactory, Object[] filterConverterParams, Set<Integer> segments, int batchSize)
- Specified by:
publishEntriesin interfaceRemoteCache<K,V>
-
retrieveEntriesByQuery
public org.infinispan.commons.util.CloseableIterator<org.infinispan.api.common.CacheEntry<Object,Object>> retrieveEntriesByQuery(RemoteQuery query, Set<Integer> segments, int batchSize)
- Specified by:
retrieveEntriesByQueryin interfaceRemoteCache<K,V>
-
publishEntriesByQuery
public <E> org.reactivestreams.Publisher<org.infinispan.api.common.CacheEntry<K,E>> publishEntriesByQuery(RemoteQuery query, Set<Integer> segments, int batchSize)
- Specified by:
publishEntriesByQueryin interfaceRemoteCache<K,V>
-
retrieveEntriesWithMetadata
public org.infinispan.commons.util.CloseableIterator<org.infinispan.api.common.CacheEntry<Object,Object>> retrieveEntriesWithMetadata(Set<Integer> segments, int batchSize)
- Specified by:
retrieveEntriesWithMetadatain interfaceRemoteCache<K,V>
-
publishEntriesWithMetadata
public org.reactivestreams.Publisher<org.infinispan.api.common.CacheEntry<K,V>> publishEntriesWithMetadata(Set<Integer> segments, int batchSize)
- Specified by:
publishEntriesWithMetadatain interfaceRemoteCache<K,V>
-
getTransactionManager
public javax.transaction.TransactionManager getTransactionManager()
- Specified by:
getTransactionManagerin interfaceRemoteCache<K,V>
-
isTransactional
public boolean isTransactional()
- Specified by:
isTransactionalin interfaceRemoteCache<K,V>
-
close
public void close() throws Exception- Specified by:
closein interfaceAutoCloseable- Throws:
Exception
-
-