LogCabin
|
Public Member Functions | |
Call (TreeLeaderRPC &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. | |
Call (const Call &) | |
Call & | operator= (const Call &) |
Public Attributes | |
TreeLeaderRPC & | leaderRPC |
OpCode | opCode |
std::unique_ptr < google::protobuf::Message > | request |
Definition at line 113 of file MockClientImpl.cc.
LogCabin::Client::anonymous_namespace{MockClientImpl.cc}::TreeLeaderRPC::Call::Call | ( | TreeLeaderRPC & | leaderRPC | ) | [inline, explicit] |
Definition at line 115 of file MockClientImpl.cc.
LogCabin::Client::anonymous_namespace{MockClientImpl.cc}::TreeLeaderRPC::Call::Call | ( | const Call & | ) |
void LogCabin::Client::anonymous_namespace{MockClientImpl.cc}::TreeLeaderRPC::Call::start | ( | OpCode | opCode, |
const google::protobuf::Message & | request, | ||
TimePoint | timeout | ||
) | [inline, 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 121 of file MockClientImpl.cc.
void LogCabin::Client::anonymous_namespace{MockClientImpl.cc}::TreeLeaderRPC::Call::cancel | ( | ) | [inline, 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 128 of file MockClientImpl.cc.
Status LogCabin::Client::anonymous_namespace{MockClientImpl.cc}::TreeLeaderRPC::Call::wait | ( | google::protobuf::Message & | response, |
TimePoint | timeout | ||
) | [inline, 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 131 of file MockClientImpl.cc.
Call& LogCabin::Client::anonymous_namespace{MockClientImpl.cc}::TreeLeaderRPC::Call::operator= | ( | const Call & | ) |
TreeLeaderRPC& LogCabin::Client::anonymous_namespace{MockClientImpl.cc}::TreeLeaderRPC::Call::leaderRPC |
Definition at line 136 of file MockClientImpl.cc.
OpCode LogCabin::Client::anonymous_namespace{MockClientImpl.cc}::TreeLeaderRPC::Call::opCode |
Definition at line 137 of file MockClientImpl.cc.
std::unique_ptr<google::protobuf::Message> LogCabin::Client::anonymous_namespace{MockClientImpl.cc}::TreeLeaderRPC::Call::request |
Definition at line 138 of file MockClientImpl.cc.