GRPC C++  1.39.1
Public Member Functions | Static Public Member Functions
grpc::ServerContextBase::CompletionOp Class Referencefinal

Public Member Functions

 CompletionOp (internal::Call *call, ::grpc::internal::ServerCallbackCall *callback_controller)
 
 CompletionOp (const CompletionOp &)=delete
 
CompletionOpoperator= (const CompletionOp &)=delete
 
 CompletionOp (CompletionOp &&)=delete
 
CompletionOpoperator= (CompletionOp &&)=delete
 
 ~CompletionOp () override
 
void FillOps (internal::Call *call) override
 Fills in grpc_op, starting from ops[*nops] and moving upwards. More...
 
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...
 
bool CheckCancelled (CompletionQueue *cq)
 
bool CheckCancelledAsync ()
 
void set_tag (void *tag)
 
void set_core_cq_tag (void *core_cq_tag)
 
void * core_cq_tag () override
 Get the tag to be used at the core completion queue. More...
 
void Unref ()
 
void SetHijackingState () override
 
void ContinueFillOpsAfterInterception () override
 
void ContinueFinalizeResultAfterInterception () override
 
- Public Member Functions inherited from grpc::internal::CompletionQueueTag
virtual ~CompletionQueueTag ()
 

Static Public Member Functions

static void operator delete (void *, std::size_t size)
 
static void operator delete (void *, void *)
 

Constructor & Destructor Documentation

◆ CompletionOp() [1/3]

grpc::ServerContextBase::CompletionOp::CompletionOp ( internal::Call call,
::grpc::internal::ServerCallbackCall callback_controller 
)
inline

◆ CompletionOp() [2/3]

grpc::ServerContextBase::CompletionOp::CompletionOp ( const CompletionOp )
delete

◆ CompletionOp() [3/3]

grpc::ServerContextBase::CompletionOp::CompletionOp ( CompletionOp &&  )
delete

◆ ~CompletionOp()

grpc::ServerContextBase::CompletionOp::~CompletionOp ( )
inlineoverride

Member Function Documentation

◆ CheckCancelled()

bool grpc::ServerContextBase::CompletionOp::CheckCancelled ( CompletionQueue cq)
inline

◆ CheckCancelledAsync()

bool grpc::ServerContextBase::CompletionOp::CheckCancelledAsync ( )
inline

◆ ContinueFillOpsAfterInterception()

void grpc::ServerContextBase::CompletionOp::ContinueFillOpsAfterInterception ( )
inlineoverridevirtual

◆ ContinueFinalizeResultAfterInterception()

void grpc::ServerContextBase::CompletionOp::ContinueFinalizeResultAfterInterception ( )
inlineoverridevirtual

◆ core_cq_tag()

void* grpc::ServerContextBase::CompletionOp::core_cq_tag ( )
inlineoverridevirtual

Get the tag to be used at the core completion queue.

Generally, the value of core_cq_tag will be "this". However, it can be overridden if we want core to process the tag differently (e.g., as a core callback)

Implements grpc::internal::CallOpSetInterface.

◆ FillOps()

void grpc::ServerContextBase::CompletionOp::FillOps ( internal::Call call)
overridevirtual

Fills in grpc_op, starting from ops[*nops] and moving upwards.

Implements grpc::internal::CallOpSetInterface.

◆ FinalizeResult()

bool grpc::ServerContextBase::CompletionOp::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.

◆ operator delete() [1/2]

static void grpc::ServerContextBase::CompletionOp::operator delete ( void *  ,
std::size_t  size 
)
inlinestatic

◆ operator delete() [2/2]

static void grpc::ServerContextBase::CompletionOp::operator delete ( void *  ,
void *   
)
inlinestatic

◆ operator=() [1/2]

CompletionOp& grpc::ServerContextBase::CompletionOp::operator= ( CompletionOp &&  )
delete

◆ operator=() [2/2]

CompletionOp& grpc::ServerContextBase::CompletionOp::operator= ( const CompletionOp )
delete

◆ set_core_cq_tag()

void grpc::ServerContextBase::CompletionOp::set_core_cq_tag ( void *  core_cq_tag)
inline

◆ set_tag()

void grpc::ServerContextBase::CompletionOp::set_tag ( void *  tag)
inline

◆ SetHijackingState()

void grpc::ServerContextBase::CompletionOp::SetHijackingState ( )
inlineoverridevirtual

◆ Unref()

void grpc::ServerContextBase::CompletionOp::Unref ( )

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