Class RemoteStore<K,V>
- java.lang.Object
-
- org.infinispan.persistence.remote.RemoteStore<K,V>
-
- All Implemented Interfaces:
org.infinispan.persistence.spi.NonBlockingStore<K,V>
public class RemoteStore<K,V> extends Object implements org.infinispan.persistence.spi.NonBlockingStore<K,V>
Cache store that delegates the call to a infinispan cluster. Communication between this cache store and the remote cluster is achieved through the java HotRod client: this assures fault tolerance and smart dispatching of calls to the nodes that have the highest chance of containing the given key. This cache store supports both preloading and fetchPersistentState. Purging elements is not possible, as HotRod does not support the fetching of all remote keys (this would be a very costly operation as well). Purging takes place at the remote end (infinispan cluster).- Since:
- 4.1
- Author:
- Mircea.Markus@jboss.com
- See Also:
RemoteStoreConfiguration, Hotrod Java Client
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.infinispan.persistence.spi.NonBlockingStore
org.infinispan.persistence.spi.NonBlockingStore.Characteristic, org.infinispan.persistence.spi.NonBlockingStore.SegmentedPublisher<Type extends Object>
-
-
Field Summary
Fields Modifier and Type Field Description protected org.infinispan.persistence.spi.InitializationContextctx
-
Constructor Summary
Constructors Constructor Description RemoteStore()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CompletionStage<Void>addSegments(org.infinispan.commons.util.IntSet segments)CompletionStage<Long>approximateSize(org.infinispan.commons.util.IntSet segments)CompletionStage<Void>batch(int publisherCount, org.reactivestreams.Publisher<org.infinispan.persistence.spi.NonBlockingStore.SegmentedPublisher<Object>> removePublisher, org.reactivestreams.Publisher<org.infinispan.persistence.spi.NonBlockingStore.SegmentedPublisher<org.infinispan.persistence.spi.MarshallableEntry<K,V>>> writePublisher)Set<org.infinispan.persistence.spi.NonBlockingStore.Characteristic>characteristics()CompletionStage<Void>clear()CompletionStage<Boolean>containsKey(int segment, Object key)CompletionStage<Boolean>delete(int segment, Object key)RemoteStoreConfigurationgetConfiguration()org.infinispan.client.hotrod.RemoteCache<Object,Object>getRemoteCache()booleanignoreCommandWithFlags(long commandFlags)CompletionStage<Boolean>isAvailable()CompletionStage<org.infinispan.persistence.spi.MarshallableEntry<K,V>>load(int segment, Object key)org.reactivestreams.Publisher<org.infinispan.persistence.spi.MarshallableEntry<K,V>>publishEntries(org.infinispan.commons.util.IntSet segments, Predicate<? super K> filter, boolean includeValues)io.reactivex.rxjava3.core.Flowable<K>publishKeys(org.infinispan.commons.util.IntSet segments, Predicate<? super K> filter)org.reactivestreams.Publisher<org.infinispan.persistence.spi.MarshallableEntry<K,V>>purgeExpired()CompletionStage<Void>removeSegments(org.infinispan.commons.util.IntSet segments)voidsetInternalCacheEntryFactory(org.infinispan.container.impl.InternalEntryFactory iceFactory)CompletionStage<Long>size(org.infinispan.commons.util.IntSet segments)CompletionStage<Void>start(org.infinispan.persistence.spi.InitializationContext ctx)CompletionStage<Void>stop()CompletionStage<Void>write(int segment, org.infinispan.persistence.spi.MarshallableEntry<? extends K,? extends V> entry)
-
-
-
Method Detail
-
start
public CompletionStage<Void> start(org.infinispan.persistence.spi.InitializationContext ctx)
-
characteristics
public Set<org.infinispan.persistence.spi.NonBlockingStore.Characteristic> characteristics()
-
stop
public CompletionStage<Void> stop()
-
isAvailable
public CompletionStage<Boolean> isAvailable()
-
load
public CompletionStage<org.infinispan.persistence.spi.MarshallableEntry<K,V>> load(int segment, Object key)
-
containsKey
public CompletionStage<Boolean> containsKey(int segment, Object key)
-
publishKeys
public io.reactivex.rxjava3.core.Flowable<K> publishKeys(org.infinispan.commons.util.IntSet segments, Predicate<? super K> filter)
-
publishEntries
public org.reactivestreams.Publisher<org.infinispan.persistence.spi.MarshallableEntry<K,V>> publishEntries(org.infinispan.commons.util.IntSet segments, Predicate<? super K> filter, boolean includeValues)
-
size
public CompletionStage<Long> size(org.infinispan.commons.util.IntSet segments)
-
approximateSize
public CompletionStage<Long> approximateSize(org.infinispan.commons.util.IntSet segments)
-
purgeExpired
public org.reactivestreams.Publisher<org.infinispan.persistence.spi.MarshallableEntry<K,V>> purgeExpired()
-
write
public CompletionStage<Void> write(int segment, org.infinispan.persistence.spi.MarshallableEntry<? extends K,? extends V> entry)
-
batch
public CompletionStage<Void> batch(int publisherCount, org.reactivestreams.Publisher<org.infinispan.persistence.spi.NonBlockingStore.SegmentedPublisher<Object>> removePublisher, org.reactivestreams.Publisher<org.infinispan.persistence.spi.NonBlockingStore.SegmentedPublisher<org.infinispan.persistence.spi.MarshallableEntry<K,V>>> writePublisher)
-
clear
public CompletionStage<Void> clear()
-
delete
public CompletionStage<Boolean> delete(int segment, Object key)
-
setInternalCacheEntryFactory
public void setInternalCacheEntryFactory(org.infinispan.container.impl.InternalEntryFactory iceFactory)
-
getConfiguration
public RemoteStoreConfiguration getConfiguration()
-
ignoreCommandWithFlags
public boolean ignoreCommandWithFlags(long commandFlags)
-
addSegments
public CompletionStage<Void> addSegments(org.infinispan.commons.util.IntSet segments)
-
removeSegments
public CompletionStage<Void> removeSegments(org.infinispan.commons.util.IntSet segments)
-
-