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

Method getSnapshot

java/src/main/java/org/rocksdb/RocksDB.java:2208–2214  ·  view source on GitHub ↗

Return a handle to the current DB state. Iterators created with this handle will all observe a stable snapshot of the current DB state. The caller must call ReleaseSnapshot(result) when the snapshot is no longer needed. nullptr will be returned if the DB fails to take a snapshot or does n

()

Source from the content-addressed store, hash-verified

2206 * @return Snapshot {@link Snapshot} instance
2207 */
2208 public Snapshot getSnapshot() {
2209 long snapshotHandle = getSnapshot(nativeHandle_);
2210 if (snapshotHandle != 0) {
2211 return new Snapshot(snapshotHandle);
2212 }
2213 return null;
2214 }
2215
2216 /**
2217 * Release a previously acquired snapshot. The caller must not

Callers 4

repeatableReadMethod · 0.45
repeatableReadMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected