Package org.rocksdb

Class Checkpoint

  • All Implemented Interfaces:
    java.lang.AutoCloseable

    public class Checkpoint
    extends RocksObject
    Provides Checkpoint functionality. Checkpoints provide persistent snapshots of RocksDB databases.
    • Method Detail

      • create

        public static Checkpoint create​(RocksDB db)
        Creates a Checkpoint object to be used for creating open-able snapshots.
        Parameters:
        db - RocksDB instance.
        Returns:
        a Checkpoint instance.
        Throws:
        java.lang.IllegalArgumentException - if RocksDB instance is null.
        java.lang.IllegalStateException - if RocksDB instance is not initialized.
      • createCheckpoint

        public void createCheckpoint​(java.lang.String checkpointPath)
                              throws RocksDBException

        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.