public interface RpcResponseFactory
| 限定符和类型 | 字段和说明 |
|---|---|
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. |
| 限定符和类型 | 方法和说明 |
|---|---|
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 © 2021. All rights reserved.