MCPcopy Create free account
hub / github.com/e2wugui/zeze / walk

Method walk

ZezeJava/ZezeJava/src/main/java/Zeze/Raft/RocksRaft/Table.java:269–280  ·  view source on GitHub ↗
(Func2<K, V, Boolean> callback)

Source from the content-addressed store, hash-verified

267 }
268
269 public boolean walk(Func2<K, V, Boolean> callback) throws Exception {
270 try (var it = rocksTable.iterator()) {
271 for (it.seekToFirst(); it.isValid(); it.next()) {
272 var key = keyDecodeFunc.apply(ByteBuffer.Wrap(it.key()));
273 var value = newValue();
274 value.decode(ByteBuffer.Wrap(it.value()));
275 if (!callback.call(key, value))
276 return false;
277 }
278 return true;
279 }
280 }
281
282 public boolean walkKey(Func1<K, Boolean> callback) throws Exception {
283 try (var it = rocksTable.iterator()) {

Callers

nothing calls this directly

Calls 10

WrapMethod · 0.95
newValueMethod · 0.95
isValidMethod · 0.80
nextMethod · 0.65
applyMethod · 0.65
keyMethod · 0.65
decodeMethod · 0.65
valueMethod · 0.65
callMethod · 0.65
iteratorMethod · 0.45

Tested by

no test coverage detected