Class RocksDBStore<K,​V>

  • All Implemented Interfaces:
    org.infinispan.persistence.spi.NonBlockingStore<K,​V>

    public class RocksDBStore<K,​V>
    extends Object
    implements org.infinispan.persistence.spi.NonBlockingStore<K,​V>
    • Constructor Detail

      • RocksDBStore

        public RocksDBStore()
    • Method Detail

      • start

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

        protected org.rocksdb.DBOptions dataDbOptions()
      • expiredDbOptions

        protected org.rocksdb.Options expiredDbOptions()
      • openDatabase

        protected static org.rocksdb.RocksDB openDatabase​(Path location,
                                                          org.rocksdb.Options options)
                                                   throws org.rocksdb.RocksDBException
        Creates database if it doesn't exist.
        Throws:
        org.rocksdb.RocksDBException
      • stop

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

        public Set<org.infinispan.persistence.spi.NonBlockingStore.Characteristic> characteristics()
        Specified by:
        characteristics 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>
      • clear

        public CompletionStage<Void> clear()
        Specified by:
        clear 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>
      • containsKey

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

        public org.reactivestreams.Publisher<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>
      • delete

        public CompletionStage<Boolean> delete​(int segment,
                                               Object key)
        Specified by:
        delete 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>
      • 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>
      • 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>
      • 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>
      • 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>