GRPC C++  1.30.0
Public Member Functions
grpc::internal::CallOpSet< Op1, Op2, Op3, Op4, Op5, Op6 > Class Template Reference

Primary implementation of CallOpSetInterface. More...

#include <call_op_set.h>

Public Member Functions

 CallOpSet ()
 
 CallOpSet (const CallOpSet &other)
 
CallOpSetoperator= (const CallOpSet &other)
 
void FillOps (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...
 
void set_output_tag (void *return_tag)
 
void * core_cq_tag () override
 Get the tag to be used at the core completion queue. More...
 
void set_core_cq_tag (void *core_cq_tag)
 set_core_cq_tag is used to provide a different core CQ tag than "this". More...
 
void SetHijackingState () override
 
void ContinueFillOpsAfterInterception () override
 
void ContinueFinalizeResultAfterInterception () override
 
- Public Member Functions inherited from grpc::internal::CompletionQueueTag
virtual ~CompletionQueueTag ()
 

Detailed Description

template<class Op1, class Op2, class Op3, class Op4, class Op5, class Op6>
class grpc::internal::CallOpSet< Op1, Op2, Op3, Op4, Op5, Op6 >

Primary implementation of CallOpSetInterface.

Since we cannot use variadic templates, we declare slots up to the maximum count of ops we'll need in a set. We leverage the empty base class optimization to slim this class (especially when there are many unused slots used). To avoid duplicate base classes, the template parameter for CallNoOp is varied by argument position.

Constructor & Destructor Documentation

◆ CallOpSet() [1/2]

template<class Op1, class Op2, class Op3, class Op4, class Op5, class Op6>
grpc::internal::CallOpSet< Op1, Op2, Op3, Op4, Op5, Op6 >::CallOpSet ( )
inline

◆ CallOpSet() [2/2]

template<class Op1, class Op2, class Op3, class Op4, class Op5, class Op6>
grpc::internal::CallOpSet< Op1, Op2, Op3, Op4, Op5, Op6 >::CallOpSet ( const CallOpSet< Op1, Op2, Op3, Op4, Op5, Op6 > &  other)
inline

Member Function Documentation

◆ ContinueFillOpsAfterInterception()

template<class Op1, class Op2, class Op3, class Op4, class Op5, class Op6>
void grpc::internal::CallOpSet< Op1, Op2, Op3, Op4, Op5, Op6 >::ContinueFillOpsAfterInterception ( )
inlineoverridevirtual

◆ ContinueFinalizeResultAfterInterception()

template<class Op1, class Op2, class Op3, class Op4, class Op5, class Op6>
void grpc::internal::CallOpSet< Op1, Op2, Op3, Op4, Op5, Op6 >::ContinueFinalizeResultAfterInterception ( )
inlineoverridevirtual

◆ core_cq_tag()

template<class Op1, class Op2, class Op3, class Op4, class Op5, class Op6>
void* grpc::internal::CallOpSet< Op1, Op2, Op3, Op4, Op5, Op6 >::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()

template<class Op1, class Op2, class Op3, class Op4, class Op5, class Op6>
void grpc::internal::CallOpSet< Op1, Op2, Op3, Op4, Op5, Op6 >::FillOps ( Call call)
inlineoverridevirtual

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

Implements grpc::internal::CallOpSetInterface.

◆ FinalizeResult()

template<class Op1, class Op2, class Op3, class Op4, class Op5, class Op6>
bool grpc::internal::CallOpSet< Op1, Op2, Op3, Op4, Op5, Op6 >::FinalizeResult ( void **  tag,
bool *  status 
)
inlineoverridevirtual

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=()

template<class Op1, class Op2, class Op3, class Op4, class Op5, class Op6>
CallOpSet& grpc::internal::CallOpSet< Op1, Op2, Op3, Op4, Op5, Op6 >::operator= ( const CallOpSet< Op1, Op2, Op3, Op4, Op5, Op6 > &  other)
inline

◆ set_core_cq_tag()

template<class Op1, class Op2, class Op3, class Op4, class Op5, class Op6>
void grpc::internal::CallOpSet< Op1, Op2, Op3, Op4, Op5, Op6 >::set_core_cq_tag ( void *  core_cq_tag)
inline

set_core_cq_tag is used to provide a different core CQ tag than "this".

This is used for callback-based tags, where the core tag is the core callback function. It does not change the use or behavior of any other function (such as FinalizeResult)

◆ set_output_tag()

template<class Op1, class Op2, class Op3, class Op4, class Op5, class Op6>
void grpc::internal::CallOpSet< Op1, Op2, Op3, Op4, Op5, Op6 >::set_output_tag ( void *  return_tag)
inline

◆ SetHijackingState()

template<class Op1, class Op2, class Op3, class Op4, class Op5, class Op6>
void grpc::internal::CallOpSet< Op1, Op2, Op3, Op4, Op5, Op6 >::SetHijackingState ( )
inlineoverridevirtual

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