MCPcopy Create free account
hub / github.com/bytedance/terarkdb / create

Method create

java/src/main/java/org/rocksdb/Checkpoint.java:26–36  ·  view source on GitHub ↗

Creates a Checkpoint object to be used for creating open-able snapshots. @param db RocksDB instance. @return a Checkpoint instance. @throws java.lang.IllegalArgumentException if RocksDB instance is null. @throws java.lang.IllegalStateException if RocksDB instance is

(final RocksDB db)

Source from the content-addressed store, hash-verified

24 * instance is not initialized.
25 */
26 public static Checkpoint create(final RocksDB db) {
27 if (db == null) {
28 throw new IllegalArgumentException(
29 "RocksDB instance shall not be null.");
30 } else if (!db.isOwningHandle()) {
31 throw new IllegalStateException(
32 "RocksDB instance must be initialized.");
33 }
34 Checkpoint checkpoint = new Checkpoint(db);
35 return checkpoint;
36 }
37
38 /**
39 * <p>Builds an open-able snapshot of RocksDB on the same disk, which

Callers 4

checkPointMethod · 0.95
failIfDbIsNullMethod · 0.95
failWithIllegalPathMethod · 0.95

Calls 1

isOwningHandleMethod · 0.45

Tested by 4

checkPointMethod · 0.76
failIfDbIsNullMethod · 0.76
failWithIllegalPathMethod · 0.76