|
LogCabin
|
See LeaderRPCBase::Call. More...
Public Member Functions | |
| Call (LeaderRPCMock &leaderRPC) | |
| void | start (OpCode opCode, const google::protobuf::Message &request, TimePoint timeout) |
| Invoke the RPC. | |
| void | cancel () |
| Cancel the RPC. | |
| Status | wait (google::protobuf::Message &response, TimePoint timeout) |
| Wait for the RPC to complete. | |
Public Attributes | |
| LeaderRPCMock & | leaderRPC |
| bool | canceled |
See LeaderRPCBase::Call.
Definition at line 68 of file LeaderRPCMock.h.
| LogCabin::Client::LeaderRPCMock::Call::Call | ( | LeaderRPCMock & | leaderRPC | ) | [explicit] |
Definition at line 67 of file LeaderRPCMock.cc.
| void LogCabin::Client::LeaderRPCMock::Call::start | ( | OpCode | opCode, |
| const google::protobuf::Message & | request, | ||
| TimePoint | timeout | ||
| ) | [virtual] |
Invoke the RPC.
| opCode | RPC operation code. The caller must guarantee that this is a valid opCode. (If the server rejects it, this will PANIC.) |
| request | The parameters for the operation. The caller must guarantee that this is a well-formed request. (If the server rejects it, this will PANIC.) |
| timeout | After this time has elapsed, stop trying to initiate the connection to the leader and use an invalid session, which will cause the RPC to fail later. |
Implements LogCabin::Client::LeaderRPCBase::Call.
Definition at line 74 of file LeaderRPCMock.cc.
| void LogCabin::Client::LeaderRPCMock::Call::cancel | ( | ) | [virtual] |
Cancel the RPC.
This may only be called after start(), but it may be called safely from a separate thread.
Implements LogCabin::Client::LeaderRPCBase::Call.
Definition at line 92 of file LeaderRPCMock.cc.
| LeaderRPCMock::Call::Status LogCabin::Client::LeaderRPCMock::Call::wait | ( | google::protobuf::Message & | response, |
| TimePoint | timeout | ||
| ) | [virtual] |
Wait for the RPC to complete.
| [out] | response | If successful, the response to the operation will be filled in here. |
| timeout | After this time has elapsed, stop waiting and return TIMEOUT. In this case, response will be left unmodified. |
Implements LogCabin::Client::LeaderRPCBase::Call.
Definition at line 98 of file LeaderRPCMock.cc.
Definition at line 77 of file LeaderRPCMock.h.
Definition at line 78 of file LeaderRPCMock.h.
1.7.6.1