Class RemoteCacheStore<K,V>

java.lang.Object
org.wildfly.clustering.cache.infinispan.persistence.remote.RemoteCacheStore<K,V>
Type Parameters:
K - the key type
V - the value type
All Implemented Interfaces:
org.infinispan.persistence.spi.NonBlockingStore<K,V>

public class RemoteCacheStore<K,V> extends Object implements org.infinispan.persistence.spi.NonBlockingStore<K,V>
Alternative to org.infinispan.persistence.remote.RemoteStore configured with a provided RemoteCacheContainer instance. Other differences include:
  • Remote caches are auto-created on the remote server.
  • Supports NonBlockingStore.Characteristic.TRANSACTIONAL
  • Supports NonBlockingStore.Characteristic.SEGMENTABLE by using a remote cache per segment allowing for independent segmentation between client and server.
Author:
Paul Ferraro
  • Constructor Details

    • RemoteCacheStore

      public RemoteCacheStore()
      Creates a remote cache store.
  • Method Details

    • characteristics

      public Set<org.infinispan.persistence.spi.NonBlockingStore.Characteristic> characteristics()
      Specified by:
      characteristics in interface org.infinispan.persistence.spi.NonBlockingStore<K,V>
    • start

      public CompletionStage<Void> start(org.infinispan.persistence.spi.InitializationContext context)
      Specified by:
      start in interface org.infinispan.persistence.spi.NonBlockingStore<K,V>
    • stop

      public CompletionStage<Void> stop()
      Specified by:
      stop in interface org.infinispan.persistence.spi.NonBlockingStore<K,V>
    • load

      public CompletionStage<org.infinispan.persistence.spi.MarshallableEntry<K,V>> load(int segment, Object key)
      Specified by:
      load in interface org.infinispan.persistence.spi.NonBlockingStore<K,V>
    • write

      public CompletionStage<Void> write(int segment, org.infinispan.persistence.spi.MarshallableEntry<? extends K, ? extends V> entry)
      Specified by:
      write in interface org.infinispan.persistence.spi.NonBlockingStore<K,V>
    • delete

      public CompletionStage<Boolean> delete(int segment, Object key)
      Specified by:
      delete in interface org.infinispan.persistence.spi.NonBlockingStore<K,V>
    • 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)
      Specified by:
      batch in interface org.infinispan.persistence.spi.NonBlockingStore<K,V>
    • publishKeys

      public io.reactivex.rxjava3.core.Flowable<K> publishKeys(org.infinispan.commons.util.IntSet segments, Predicate<? super K> filter)
      Specified by:
      publishKeys in interface org.infinispan.persistence.spi.NonBlockingStore<K,V>
    • 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)
      Specified by:
      publishEntries in interface org.infinispan.persistence.spi.NonBlockingStore<K,V>
    • clear

      public CompletionStage<Void> clear()
      Specified by:
      clear in interface org.infinispan.persistence.spi.NonBlockingStore<K,V>
    • containsKey

      public CompletionStage<Boolean> containsKey(int segment, Object key)
      Specified by:
      containsKey in interface org.infinispan.persistence.spi.NonBlockingStore<K,V>
    • isAvailable

      public CompletionStage<Boolean> isAvailable()
      Specified by:
      isAvailable in interface org.infinispan.persistence.spi.NonBlockingStore<K,V>
    • size

      public CompletionStage<Long> size(org.infinispan.commons.util.IntSet segments)
      Specified by:
      size in interface org.infinispan.persistence.spi.NonBlockingStore<K,V>
    • approximateSize

      public CompletionStage<Long> approximateSize(org.infinispan.commons.util.IntSet segments)
      Specified by:
      approximateSize in interface org.infinispan.persistence.spi.NonBlockingStore<K,V>
    • addSegments

      public CompletionStage<Void> addSegments(org.infinispan.commons.util.IntSet segments)
      Specified by:
      addSegments in interface org.infinispan.persistence.spi.NonBlockingStore<K,V>
    • removeSegments

      public CompletionStage<Void> removeSegments(org.infinispan.commons.util.IntSet segments)
      Specified by:
      removeSegments in interface org.infinispan.persistence.spi.NonBlockingStore<K,V>
    • purgeExpired

      public org.reactivestreams.Publisher<org.infinispan.persistence.spi.MarshallableEntry<K,V>> purgeExpired()
      Specified by:
      purgeExpired in interface org.infinispan.persistence.spi.NonBlockingStore<K,V>
    • prepareWithModifications

      public CompletionStage<Void> prepareWithModifications(jakarta.transaction.Transaction transaction, 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)
      Specified by:
      prepareWithModifications in interface org.infinispan.persistence.spi.NonBlockingStore<K,V>
    • commit

      public CompletionStage<Void> commit(jakarta.transaction.Transaction transaction)
      Specified by:
      commit in interface org.infinispan.persistence.spi.NonBlockingStore<K,V>
    • rollback

      public CompletionStage<Void> rollback(jakarta.transaction.Transaction transaction)
      Specified by:
      rollback in interface org.infinispan.persistence.spi.NonBlockingStore<K,V>