Package org.infinispan.hotrod.impl.cache
Class RemoteCacheImpl<K,V>
- java.lang.Object
-
- org.infinispan.hotrod.impl.cache.RemoteCacheImpl<K,V>
-
- All Implemented Interfaces:
AutoCloseable,RemoteCache<K,V>
- Direct Known Subclasses:
TransactionalRemoteCacheImpl
public class RemoteCacheImpl<K,V> extends Object implements RemoteCache<K,V>
- Since:
- 4.1
- Author:
- Mircea.Markus@jboss.com
-
-
Constructor Summary
Constructors Constructor Description RemoteCacheImpl(HotRodTransport hotRodTransport, String name, org.infinispan.commons.time.TimeService timeService, NearCacheService<K,V> nearCacheService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SocketAddressaddNearCacheListener(Object listener, int bloomBits)protected voidassertRemoteCacheManagerIsStarted()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)ClientStatisticsgetClientStatistics()DataFormatgetDataFormat()RetryAwareCompletionStage<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()booleanisObjectStorage()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)CompletionStage<PingResponse>ping()<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>>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)StringtoString()CompletionStage<Void>updateBloomFilter()byte[]valueToBytes(Object o)<K1,V1>
RemoteCache<K1,V1>withDataFormat(DataFormat newDataFormat)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.infinispan.hotrod.impl.cache.RemoteCache
retrieveEntries
-
-
-
-
Constructor Detail
-
RemoteCacheImpl
public RemoteCacheImpl(HotRodTransport hotRodTransport, String name, org.infinispan.commons.time.TimeService timeService, NearCacheService<K,V> nearCacheService)
-
-
Method Detail
-
getName
public String getName()
- Specified by:
getNamein interfaceRemoteCache<K,V>
-
getDataFormat
public DataFormat getDataFormat()
- Specified by:
getDataFormatin interfaceRemoteCache<K,V>
-
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>
-
keyAsObjectIfNeeded
public K keyAsObjectIfNeeded(Object key)
- Specified by:
keyAsObjectIfNeededin interfaceRemoteCache<K,V>
-
close
public void close()
- Specified by:
closein interfaceAutoCloseable
-
addNearCacheListener
public SocketAddress addNearCacheListener(Object listener, int bloomBits)
- Specified by:
addNearCacheListenerin interfaceRemoteCache<K,V>
-
ping
public CompletionStage<PingResponse> ping()
-
keyToBytes
public byte[] keyToBytes(Object o)
- Specified by:
keyToBytesin interfaceRemoteCache<K,V>
-
valueToBytes
public byte[] valueToBytes(Object o)
- Specified by:
valueToBytesin interfaceRemoteCache<K,V>
-
getEntry
public RetryAwareCompletionStage<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>
-
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>
-
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>
-
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>
-
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>
-
assertRemoteCacheManagerIsStarted
protected void assertRemoteCacheManagerIsStarted()
-
withDataFormat
public <K1,V1> RemoteCache<K1,V1> withDataFormat(DataFormat newDataFormat)
- Specified by:
withDataFormatin interfaceRemoteCache<K,V>
-
resolveStorage
public void resolveStorage(boolean objectStorage)
- Specified by:
resolveStoragein interfaceRemoteCache<K,V>
-
isObjectStorage
public boolean isObjectStorage()
-
updateBloomFilter
public CompletionStage<Void> updateBloomFilter()
- Specified by:
updateBloomFilterin interfaceRemoteCache<K,V>
-
getClientStatistics
public ClientStatistics getClientStatistics()
-
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>
-
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>
-
-