GRPC C++  1.66.0
Public Member Functions | Protected Attributes
grpc::ServerInterface::BaseAsyncRequest Class Reference

#include <server_interface.h>

Public Member Functions

 BaseAsyncRequest (ServerInterface *server, grpc::ServerContext *context, internal::ServerAsyncStreamingInterface *stream, grpc::CompletionQueue *call_cq, grpc::ServerCompletionQueue *notification_cq, void *tag, bool delete_on_finalize)
 
 ~BaseAsyncRequest () override
 
bool FinalizeResult (void **tag, bool *status) override
 FinalizeResult must be called before informing user code that the operation bound to the underlying core completion queue tag has completed. More...
 
- Public Member Functions inherited from grpc::internal::CompletionQueueTag
virtual ~CompletionQueueTag ()
 

Protected Attributes

ServerInterface *const server_
 
grpc::ServerContext *const context_
 
internal::ServerAsyncStreamingInterface *const stream_
 
grpc::CompletionQueue *const call_cq_
 
grpc::ServerCompletionQueue *const notification_cq_
 
void *const tag_
 
const bool delete_on_finalize_
 
grpc_callcall_
 
internal::Call call_wrapper_
 
internal::InterceptorBatchMethodsImpl interceptor_methods_
 
bool done_intercepting_
 
bool call_metric_recording_enabled_
 
experimental::ServerMetricRecorderserver_metric_recorder_
 

Constructor & Destructor Documentation

◆ BaseAsyncRequest()

grpc::ServerInterface::BaseAsyncRequest::BaseAsyncRequest ( ServerInterface server,
grpc::ServerContext context,
internal::ServerAsyncStreamingInterface stream,
grpc::CompletionQueue call_cq,
grpc::ServerCompletionQueue notification_cq,
void *  tag,
bool  delete_on_finalize 
)

◆ ~BaseAsyncRequest()

grpc::ServerInterface::BaseAsyncRequest::~BaseAsyncRequest ( )
override

Member Function Documentation

◆ FinalizeResult()

bool grpc::ServerInterface::BaseAsyncRequest::FinalizeResult ( void **  tag,
bool *  status 
)
overridevirtual

FinalizeResult must be called before informing user code that the operation bound to the underlying core completion queue tag has completed.

In practice, this means:

  1. For the sync API - before returning from Pluck
  2. For the CQ-based async API - before returning from Next
  3. For the callback-based API - before invoking the user callback

This is the method that translates from core-side tag/status to C++ API-observable tag/status.

The return value is the status of the operation (returning status is the general behavior of this function). If this function returns false, the tag is dropped and not returned from the completion queue: this concept is for events that are observed at core but not requested by the user application (e.g., server shutdown, for server unimplemented method responses, or for cases where a server-side RPC doesn't have a completion notification registered using AsyncNotifyWhenDone)

Implements grpc::internal::CompletionQueueTag.

Reimplemented in grpc::ServerInterface::GenericAsyncRequest, grpc::ServerInterface::PayloadAsyncRequest< Message >, and grpc::ServerInterface::RegisteredAsyncRequest.

Field Documentation

◆ call_

grpc_call* grpc::ServerInterface::BaseAsyncRequest::call_
protected

◆ call_cq_

grpc::CompletionQueue* const grpc::ServerInterface::BaseAsyncRequest::call_cq_
protected

◆ call_metric_recording_enabled_

bool grpc::ServerInterface::BaseAsyncRequest::call_metric_recording_enabled_
protected

◆ call_wrapper_

internal::Call grpc::ServerInterface::BaseAsyncRequest::call_wrapper_
protected

◆ context_

grpc::ServerContext* const grpc::ServerInterface::BaseAsyncRequest::context_
protected

◆ delete_on_finalize_

const bool grpc::ServerInterface::BaseAsyncRequest::delete_on_finalize_
protected

◆ done_intercepting_

bool grpc::ServerInterface::BaseAsyncRequest::done_intercepting_
protected

◆ interceptor_methods_

internal::InterceptorBatchMethodsImpl grpc::ServerInterface::BaseAsyncRequest::interceptor_methods_
protected

◆ notification_cq_

grpc::ServerCompletionQueue* const grpc::ServerInterface::BaseAsyncRequest::notification_cq_
protected

◆ server_

ServerInterface* const grpc::ServerInterface::BaseAsyncRequest::server_
protected

◆ server_metric_recorder_

experimental::ServerMetricRecorder* grpc::ServerInterface::BaseAsyncRequest::server_metric_recorder_
protected

◆ stream_

internal::ServerAsyncStreamingInterface* const grpc::ServerInterface::BaseAsyncRequest::stream_
protected

◆ tag_

void* const grpc::ServerInterface::BaseAsyncRequest::tag_
protected

The documentation for this class was generated from the following file: