Interface RemoteMessage
- All Superinterfaces:
FutureMessage
- All Known Subinterfaces:
CommunicationMessage, Request, Response
- All Known Implementing Classes:
AbstractCommunicationMessage, CommonMessage, ExternalMessage, RequestMessage, ResponseMessage, SendMessage, UserRequestMessage, UserResponseMessage
Contract for messages transmitted between servers in the ionet cluster.
Extends FutureMessage and defines the common wire-level fields shared by all
inter-server messages: the merged command route key, trace ID for distributed tracing,
server routing IDs (external, logic, source), network identifier, serialized payload,
error output, and nanosecond-precision timing.
- Since:
- 25.1
- Author:
- 渔民小镇
- date:
- 2025-09-15
-
Method Summary
Modifier and TypeMethodDescriptionDerive theCmdInforoute descriptor from the merged command key.intGet the merged command route key (cmd + subCmd packed into a single int).byte[]getData()Get the serialized payload data.intGet the ID of the external server that originated or will receive this message.intGet the ID of the logic server handling this message.longGet the nanosecond timestamp recorded when this message was created or received.intgetNetId()Get the network-level identifier.intGet the ID of the server that originally created this message.Get the distributed trace ID for this message.voidsetCmdInfo(CmdInfo cmdInfo) Set the command route from aCmdInfodescriptor.voidsetCmdMerge(int cmdMerge) Set the merged command route key.voidsetData(byte[] data) Set the serialized payload data.voidsetExternalServerId(int externalServerId) Set the ID of the external server.voidsetLogicServerId(int logicServerId) Set the ID of the logic server handling this message.voidsetNanoTime(long nanoTime) Set the nanosecond timestamp for this message.voidsetNetId(int netId) Set the network-level identifier.voidsetOutputError(ErrorInformation error) Set the error information to be included in the response.voidsetSourceServerId(int sourceServerId) Set the ID of the server that originally created this message.voidsetTraceId(String traceId) Set the distributed trace ID for this message.Methods inherited from interface FutureMessage
getFutureId, setFutureId
-
Method Details
-
getCmdMerge
int getCmdMerge()Get the merged command route key (cmd + subCmd packed into a single int).- Returns:
- the merged command key
-
setCmdMerge
void setCmdMerge(int cmdMerge) Set the merged command route key.- Parameters:
cmdMerge- the merged command key
-
getTraceId
String getTraceId()Get the distributed trace ID for this message.- Returns:
- the trace ID, or
nullif not set
-
setTraceId
Set the distributed trace ID for this message.- Parameters:
traceId- the trace ID
-
getExternalServerId
int getExternalServerId()Get the ID of the external server that originated or will receive this message.- Returns:
- the external server ID
-
setExternalServerId
void setExternalServerId(int externalServerId) Set the ID of the external server.- Parameters:
externalServerId- the external server ID
-
getLogicServerId
int getLogicServerId()Get the ID of the logic server handling this message.- Returns:
- the logic server ID
-
setLogicServerId
void setLogicServerId(int logicServerId) Set the ID of the logic server handling this message.- Parameters:
logicServerId- the logic server ID
-
getSourceServerId
int getSourceServerId()Get the ID of the server that originally created this message.- Returns:
- the source server ID
-
setSourceServerId
void setSourceServerId(int sourceServerId) Set the ID of the server that originally created this message.- Parameters:
sourceServerId- the source server ID
-
getNetId
int getNetId()Get the network-level identifier.- Returns:
- the net ID
-
setNetId
void setNetId(int netId) Set the network-level identifier.- Parameters:
netId- the net ID
-
getData
byte[] getData()Get the serialized payload data.- Returns:
- the payload byte array
-
setData
void setData(byte[] data) Set the serialized payload data.- Parameters:
data- the payload byte array
-
setCmdInfo
-
getCmdInfo
-
setOutputError
Set the error information to be included in the response.- Parameters:
error- the error information
-
getNanoTime
long getNanoTime()Get the nanosecond timestamp recorded when this message was created or received.- Returns:
- the nano time
-
setNanoTime
void setNanoTime(long nanoTime) Set the nanosecond timestamp for this message.- Parameters:
nanoTime- the nano time
-