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

Method put

ZezeJava/ZezeJava/src/main/java/Zeze/Transaction/TableX.java:694–713  ·  view source on GitHub ↗
(@NotNull K key, @NotNull V value)

Source from the content-addressed store, hash-verified

692 }
693
694 public final void put(@NotNull K key, @NotNull V value) {
695 var currentT = Transaction.getCurrent();
696 assert currentT != null;
697 //noinspection ConstantValue
698 if (key == null)
699 throw new IllegalArgumentException("key is null");
700 //noinspection ConstantValue
701 if (value == null)
702 throw new IllegalArgumentException("value is null");
703
704 var tkey = new TableKey(getId(), key);
705 var cr = currentT.getRecordAccessed(tkey);
706 if (cr == null) {
707 var r = load(key);
708 cr = new RecordAccessed(r);
709 currentT.addRecordAccessed(r.record.createRootInfoIfNeed(tkey), cr, r.strongRef == null && isMemory());
710 }
711 value.initRootInfoWithRedo(cr.atomicTupleRecord.record.createRootInfoIfNeed(tkey), null);
712 cr.put(currentT, value);
713 }
714
715 @Override
716 public void removeEncodedKey(@NotNull Binary encodedKey) {

Callers

nothing calls this directly

Calls 9

getCurrentMethod · 0.95
loadMethod · 0.95
getIdMethod · 0.65
isMemoryMethod · 0.65
putMethod · 0.65
getRecordAccessedMethod · 0.45
addRecordAccessedMethod · 0.45
createRootInfoIfNeedMethod · 0.45
initRootInfoWithRedoMethod · 0.45

Tested by

no test coverage detected