A thin wrapper around grpc_completion_queue (see src/core/lib/surface/completion_queue.h).
More...
#include <completion_queue.h>
|
| template<class R > |
| class | ::grpc::ClientReader |
| |
| template<class W > |
| class | ::grpc::ClientWriter |
| |
| template<class W , class R > |
| class | ::grpc::ClientReaderWriter |
| |
| template<class R > |
| class | ::grpc::ServerReader |
| |
| template<class W > |
| class | ::grpc::ServerWriter |
| |
| template<class W , class R > |
| class | ::grpc::internal::ServerReaderWriterBody |
| |
| 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 Streamer , bool WriteNeeded> |
| class | TemplatedBidiStreamingHandler |
| |
| class | UnknownMethodHandler |
| |
| class | ::grpc::Server |
| |
| class | ::grpc::ServerContext |
| |
| template<class InputMessage , class OutputMessage > |
| Status | BlockingUnaryCall (ChannelInterface *channel, const RpcMethod &method, ClientContext *context, const InputMessage &request, OutputMessage *result) |
| |
A thin wrapper around grpc_completion_queue (see src/core/lib/surface/completion_queue.h).
See C++ Performance Notes for notes on best practices for high performance servers.
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 |
( |
| ) |
|
|
inline |
Default constructor.
Implicitly creates a grpc_completion_queue instance.
Wrap take, taking ownership of the instance.
- Parameters
-
| take | The completion queue instance to wrap. Ownership is taken. |
| grpc::CompletionQueue::~CompletionQueue |
( |
| ) |
|
|
inline |
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.
| void grpc::CompletionQueue::CompleteAvalanching |
( |
| ) |
|
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.
| void grpc::CompletionQueue::InitialAvalanching |
( |
| ) |
|
|
inline |
Manage state of avalanching operations : completion queue tags that trigger other completion queue operations.
The underlying core completion queue should not really shutdown until all avalanching operations have been finalized. Note that we maintain the requirement that an avalanche registration must take place before CQ shutdown (which must be maintained elsehwere)
| 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::RegisterAvalanching |
( |
| ) |
|
|
inline |
| void grpc::CompletionQueue::Shutdown |
( |
| ) |
|
Request the shutdown of the queue.
- Warning
- This method must be called at some point if this completion queue is accessed with Next or AsyncNext. 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 W , class R >
template<class W , class R >
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 >
template<class Streamer , bool WriteNeeded>
The documentation for this class was generated from the following file: