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

Method encodeShared

ZezeJava/ZezeJava/src/main/java/Zeze/Net/Protocol.java:92–104  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

90 }
91
92 public @NotNull ByteBuffer encodeShared() {
93 var us = userState;
94 if (us instanceof UserStateWithEncoded)
95 return ((UserStateWithEncoded)us).encodeShared;
96 var bb = encode();
97 for (var newUs = new UserStateWithEncoded(us, bb); ; newUs.userState = us) {
98 if (userStateHandle.compareAndSet(this, us, newUs))
99 return bb;
100 us = userStateHandle.getVolatile(this);
101 if (us instanceof UserStateWithEncoded)
102 return ((UserStateWithEncoded)us).encodeShared;
103 }
104 }
105
106 public final long getResultCode() {
107 return resultCode;

Callers 1

SendSharedMethod · 0.80

Calls 1

encodeMethod · 0.95

Tested by

no test coverage detected