Class RocksDBStore<K,V>
- java.lang.Object
-
- org.infinispan.persistence.rocksdb.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>
-
-
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 RocksDBStoreConfigurationconfiguration
-
Constructor Summary
Constructors Constructor Description RocksDBStore()
-
Method Summary
All Methods Static 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)protected org.rocksdb.DBOptionsdataDbOptions()CompletionStage<Boolean>delete(int segment, Object key)protected org.rocksdb.OptionsexpiredDbOptions()CompletionStage<Boolean>isAvailable()CompletionStage<org.infinispan.persistence.spi.MarshallableEntry<K,V>>load(int segment, Object key)protected static org.rocksdb.RocksDBopenDatabase(Path location, org.rocksdb.Options options)Creates database if it doesn't exist.org.reactivestreams.Publisher<org.infinispan.persistence.spi.MarshallableEntry<K,V>>publishEntries(org.infinispan.commons.util.IntSet segments, Predicate<? super K> filter, boolean includeValues)org.reactivestreams.Publisher<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)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)
-
-
-
Field Detail
-
configuration
protected RocksDBStoreConfiguration configuration
-
-
Method Detail
-
start
public CompletionStage<Void> start(org.infinispan.persistence.spi.InitializationContext ctx)
-
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()
-
characteristics
public Set<org.infinispan.persistence.spi.NonBlockingStore.Characteristic> characteristics()
-
isAvailable
public CompletionStage<Boolean> isAvailable()
-
clear
public CompletionStage<Void> clear()
-
size
public CompletionStage<Long> size(org.infinispan.commons.util.IntSet segments)
-
approximateSize
public CompletionStage<Long> approximateSize(org.infinispan.commons.util.IntSet segments)
-
containsKey
public CompletionStage<Boolean> containsKey(int segment, Object key)
-
publishKeys
public org.reactivestreams.Publisher<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)
-
delete
public CompletionStage<Boolean> delete(int segment, Object key)
-
write
public CompletionStage<Void> write(int segment, org.infinispan.persistence.spi.MarshallableEntry<? extends K,? extends V> entry)
-
load
public CompletionStage<org.infinispan.persistence.spi.MarshallableEntry<K,V>> load(int segment, Object key)
-
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)
-
purgeExpired
public org.reactivestreams.Publisher<org.infinispan.persistence.spi.MarshallableEntry<K,V>> purgeExpired()
-
addSegments
public CompletionStage<Void> addSegments(org.infinispan.commons.util.IntSet segments)
-
removeSegments
public CompletionStage<Void> removeSegments(org.infinispan.commons.util.IntSet segments)
-
-