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

Method get

ZezeJava/ZezeJava/src/main/java/Zeze/History/ApplyTable.java:35–47  ·  view source on GitHub ↗
(@NotNull K key)

Source from the content-addressed store, hash-verified

33 }
34
35 public @Nullable V get(@NotNull K key) {
36 var value = lru.get(key);
37 if (value != null)
38 return value;
39 var bbKey = originTable.encodeKey(key);
40 var valueRaw = table.get(bbKey.Bytes, bbKey.ReadIndex, bbKey.size());
41 if (valueRaw == null)
42 return null;
43 value = originTable.newValue();
44 value.decode(ByteBuffer.Wrap(valueRaw));
45 lru.put(key, value);
46 return value;
47 }
48
49 @SuppressWarnings("unchecked")
50 public K apply(@NotNull BTableKey tableKey, @NotNull Binary changes) throws Exception {

Callers 2

applyMethod · 0.95
verifyAndClearMethod · 0.95

Calls 7

WrapMethod · 0.95
getMethod · 0.65
encodeKeyMethod · 0.65
sizeMethod · 0.65
newValueMethod · 0.65
decodeMethod · 0.65
putMethod · 0.65

Tested by

no test coverage detected