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

Method addRpcContext

ZezeJava/ZezeJava/src/main/java/Zeze/Net/Service.java:652–658  ·  view source on GitHub ↗

Rpc Context. 模板不好放进去,使用基类 Protocol

(@NotNull Protocol<?> p)

Source from the content-addressed store, hash-verified

650 * Rpc Context. 模板不好放进去,使用基类 Protocol
651 */
652 public final long addRpcContext(@NotNull Protocol<?> p) {
653 while (true) {
654 long sessionId = nextSessionId();
655 if (rpcContexts.putIfAbsent(sessionId, p) == null)
656 return sessionId;
657 }
658 }
659
660 void addRpcContext(long sessionId, @NotNull Protocol<?> p) {
661 rpcContexts.putIfAbsent(sessionId, p);

Callers 4

SendMethod · 0.95
sendOnlineRpcMethod · 0.80
SendReturnVoidMethod · 0.80
handleMethod · 0.80

Calls 2

nextSessionIdMethod · 0.95
putIfAbsentMethod · 0.65

Tested by

no test coverage detected