A thin wrapper around grpc_completion_queue (see / src/core/surface/completion_queue.h).
More...
#include <completion_queue.h>
|
| template<class R > |
| class | ::grpc::ClientReader |
| |
| template<class W > |
| class | ::grpc::ClientWriter |
| |
| template<class R , class W > |
| class | ::grpc::ClientReaderWriter |
| |
| template<class R > |
| class | ::grpc::ServerReader |
| |
| template<class W > |
| class | ::grpc::ServerWriter |
| |
| template<class R , class W > |
| class | ::grpc::ServerReaderWriter |
| |
| template<class ServiceType , class RequestType , class ResponseType > |
| class | RpcMethodHandler |
| |
| template<class ServiceType , class RequestType , class ResponseType > |
| class | ClientStreamingHandler |
| |
| template<class ServiceType , class RequestType , class ResponseType > |
| class | ServerStreamingHandler |
| |
| template<class ServiceType , class RequestType , class ResponseType > |
| class | BidiStreamingHandler |
| |
| class | UnknownMethodHandler |
| |
| class | ::grpc::Server |
| |
| class | ::grpc::ServerContext |
| |
| template<class InputMessage , class OutputMessage > |
| Status | BlockingUnaryCall (Channel *channel, const RpcMethod &method, ClientContext *context, const InputMessage &request, OutputMessage *result) |
| |
A thin wrapper around grpc_completion_queue (see / src/core/surface/completion_queue.h).
Tri-state return for AsyncNext: SHUTDOWN, GOT_EVENT, TIMEOUT.
| Enumerator |
|---|
| SHUTDOWN |
The completion queue has been shutdown.
|
| GOT_EVENT |
Got a new event; tag will be filled in with its associated value; ok indicating its success.
|
| TIMEOUT |
deadline was reached.
|
| grpc::CompletionQueue::CompletionQueue |
( |
| ) |
|
Default constructor.
Implicitly creates a grpc_completion_queue instance.
| grpc::CompletionQueue::CompletionQueue |
( |
grpc_completion_queue * |
take | ) |
|
|
explicit |
Wrap take, taking ownership of the instance.
- Parameters
-
| take | The completion queue instance to wrap. Ownership is taken. |
| grpc::CompletionQueue::~CompletionQueue |
( |
| ) |
|
Destructor. Destroys the owned wrapped completion queue / instance.
template<typename T >
| NextStatus grpc::CompletionQueue::AsyncNext |
( |
void ** |
tag, |
|
|
bool * |
ok, |
|
|
const T & |
deadline |
|
) |
| |
|
inline |
Read from the queue, blocking up to deadline (or the queue's shutdown).
Both tag and ok are updated upon success (if an event is available within the deadline). A tag points to an arbitrary location usually employed to uniquely identify an event.
- Parameters
-
| tag[out] | Upon sucess, updated to point to the event's tag. |
| ok[out] | Upon sucess, true if read a regular event, false otherwise. |
| deadline[in] | How long to block in wait for an event. |
- Returns
- The type of event read.
| grpc_completion_queue* grpc::CompletionQueue::cq |
( |
| ) |
|
|
inline |
Returns a raw pointer to the underlying grpc_completion_queue instance.
- Warning
- Remember that the returned instance is owned. No transfer of owership is performed.
| bool grpc::CompletionQueue::Next |
( |
void ** |
tag, |
|
|
bool * |
ok |
|
) |
| |
|
inline |
Read from the queue, blocking until an event is available or the queue is shutting down.
- Parameters
-
| tag[out] | Updated to point to the read event's tag. |
| ok[out] | true if read a regular event, false otherwise. |
- Returns
- true if read a regular event, false if the queue is shutting down.
| void grpc::CompletionQueue::Shutdown |
( |
| ) |
|
Request the shutdown of the queue.
- Warning
- This method must be called at some point. Once invoked, Next will start to return false and AsyncNext will return NextStatus::SHUTDOWN. Only once either one of these methods does that (that is, once the queue has been drained) can an instance of this class be destroyed.
template<class R , class W >
template<class R , class W >
template<class ServiceType , class RequestType , class ResponseType >
template<class InputMessage , class OutputMessage >
template<class ServiceType , class RequestType , class ResponseType >
template<class ServiceType , class RequestType , class ResponseType >
template<class ServiceType , class RequestType , class ResponseType >
The documentation for this class was generated from the following file: