public interface RpcResponseFactory
| Modifier and Type | Field and Description |
|---|---|
static int |
ERROR_RESPONSE_NUM
This is a convention that if a
Message contains an RpcRequests.ErrorResponse field,
it can only be in position 99. |
| Modifier and Type | Method and Description |
|---|---|
default com.google.protobuf.Message |
newResponse(com.google.protobuf.Message parent,
int code,
String fmt,
Object... args)
Creates an error response with parameters.
|
default com.google.protobuf.Message |
newResponse(com.google.protobuf.Message parent,
RaftError error,
String fmt,
Object... args)
Creates an error response with parameters.
|
default com.google.protobuf.Message |
newResponse(com.google.protobuf.Message parent,
Status st)
Creates a RPC response from status, return OK response
when status is null.
|
static final int ERROR_RESPONSE_NUM
Message contains an RpcRequests.ErrorResponse field,
it can only be in position 99.default com.google.protobuf.Message newResponse(com.google.protobuf.Message parent,
Status st)
parent - parent messagest - status with responsedefault com.google.protobuf.Message newResponse(com.google.protobuf.Message parent,
RaftError error,
String fmt,
Object... args)
parent - parent messageerror - error with raft infofmt - message with format stringargs - arguments referenced by the format specifiers in the format stringdefault com.google.protobuf.Message newResponse(com.google.protobuf.Message parent,
int code,
String fmt,
Object... args)
parent - parent messagecode - error code with raft infofmt - message with format stringargs - arguments referenced by the format specifiers in the format stringCopyright © 2024. All rights reserved.