Package org.rocksdb
Class Checkpoint
- All Implemented Interfaces:
AutoCloseable
Provides Checkpoint functionality. Checkpoints
provide persistent snapshots of RocksDB databases.
-
Field Summary
Fields inherited from class org.rocksdb.RocksObject
nativeHandle_Fields inherited from class org.rocksdb.AbstractImmutableNativeReference
owningHandle_ -
Method Summary
Modifier and TypeMethodDescriptionstatic CheckpointCreates a Checkpoint object to be used for creating open-able snapshots.voidcreateCheckpoint(String checkpointPath) Builds an open-able snapshot of RocksDB on the same disk, which accepts an output directory on the same disk, and under the directory (1) hard-linked SST files pointing to existing live SST files (2) a copied manifest files and other filesprotected final voiddisposeInternal(long handle) exportColumnFamily(ColumnFamilyHandle columnFamilyHandle, String exportPath) Methods inherited from class org.rocksdb.RocksObject
disposeInternal, getNativeHandleMethods inherited from class org.rocksdb.AbstractImmutableNativeReference
close, disOwnNativeHandle, isOwningHandle
-
Method Details
-
create
Creates a Checkpoint object to be used for creating open-able snapshots.- Parameters:
db-RocksDBinstance.- Returns:
- a Checkpoint instance.
- Throws:
IllegalArgumentException- ifRocksDBinstance is null.IllegalStateException- ifRocksDBinstance is not initialized.
-
createCheckpoint
Builds an open-able snapshot of RocksDB on the same disk, which accepts an output directory on the same disk, and under the directory (1) hard-linked SST files pointing to existing live SST files (2) a copied manifest files and other files
- Parameters:
checkpointPath- path to the folder where the snapshot is going to be stored.- Throws:
RocksDBException- thrown if an error occurs within the native part of the library.
-
exportColumnFamily
public ExportImportFilesMetaData exportColumnFamily(ColumnFamilyHandle columnFamilyHandle, String exportPath) throws RocksDBException - Throws:
RocksDBException
-
disposeInternal
protected final void disposeInternal(long handle) - Specified by:
disposeInternalin classRocksObject
-