@ThreadSafe
public final class RocksStore
extends java.lang.Object
implements java.io.Closeable
| Constructor and Description |
|---|
RocksStore(java.lang.String dbPath,
java.lang.String checkpointPath,
java.util.Collection<org.rocksdb.ColumnFamilyDescriptor> columnFamilyDescriptors,
org.rocksdb.DBOptions dbOpts,
java.util.List<java.util.concurrent.atomic.AtomicReference<org.rocksdb.ColumnFamilyHandle>> columnHandles) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clears and re-initializes the database.
|
void |
close() |
org.rocksdb.RocksDB |
getDb() |
void |
restoreFromCheckpoint(CheckpointInputStream input)
Restores the database from a checkpoint.
|
void |
writeToCheckpoint(java.io.OutputStream output)
Writes a checkpoint of the database's content to the given output stream.
|
public RocksStore(java.lang.String dbPath,
java.lang.String checkpointPath,
java.util.Collection<org.rocksdb.ColumnFamilyDescriptor> columnFamilyDescriptors,
org.rocksdb.DBOptions dbOpts,
java.util.List<java.util.concurrent.atomic.AtomicReference<org.rocksdb.ColumnFamilyHandle>> columnHandles)
dbPath - a path for the rocks databasecheckpointPath - a path for taking database checkpointscolumnFamilyDescriptors - columns to create within the rocks databasedbOpts - db optionscolumnHandles - column handle references to populatepublic org.rocksdb.RocksDB getDb()
public void clear()
public void writeToCheckpoint(java.io.OutputStream output)
throws java.io.IOException,
java.lang.InterruptedException
output - the stream to write tojava.io.IOExceptionjava.lang.InterruptedExceptionpublic void restoreFromCheckpoint(CheckpointInputStream input) throws java.io.IOException
input - the checkpoint stream to restore fromjava.io.IOExceptionpublic void close()
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableCopyright © 2019. All Rights Reserved.