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

Method setSnapshot

java/src/main/java/org/rocksdb/ReadOptions.java:115–123  ·  view source on GitHub ↗

If "snapshot" is non-nullptr, read as of the supplied snapshot (which must belong to the DB that is being read and which must not have been released). If "snapshot" is nullptr, use an implicit snapshot of the state at the beginning of this read operation. Default: null @param snapsho

(final Snapshot snapshot)

Source from the content-addressed store, hash-verified

113 * @return the reference to the current ReadOptions.
114 */
115 public ReadOptions setSnapshot(final Snapshot snapshot) {
116 assert(isOwningHandle());
117 if (snapshot != null) {
118 setSnapshot(nativeHandle_, snapshot.nativeHandle_);
119 } else {
120 setSnapshot(nativeHandle_, 0l);
121 }
122 return this;
123 }
124
125 /**
126 * Returns the current read tier.

Callers 4

repeatableReadMethod · 0.45
repeatableReadMethod · 0.45

Calls 1

isOwningHandleMethod · 0.45

Tested by

no test coverage detected