Skip to content

TProducerRPCBackend

gRPC producer backend: sends responses to the clients, discards their requests

template <class ServiceType, typename RequestType, typename ResponseType>
class TProducerRPCBackend
: public TRPCBackend<ServiceType, RequestType, ResponseType>,
public IProducerBackend<ResponseType>

Methods

TProducerRPCBackend

inline TProducerRPCBackend(gRPCBackend::AsyncRPCHandle TargetRPC,
std::shared_ptr<ServiceType> Service,
std::unique_ptr<ServerCompletionQueue> CQueue)

Parameters

  • TargetRPC (gRPCBackend::AsyncRPCHandle)

  • Service (std::shared_ptr<ServiceType>)

  • CQueue (std::unique_ptr<ServerCompletionQueue>)


TProducerRPCBackend

inline ~TProducerRPCBackend()

Publish

inline virtual void Publish(ResponseType *Response) override

Send a message to the client.

Parameters

  • Response (ResponseType)

Initialize

inline virtual void Initialize()

Perform any setup that happens prior to establishing any external connection.


Start

inline virtual void Start()

Starts the producer completion-queue worker thread.


Establish

inline virtual void Establish()

Perform any setup that involves handshakes with the external communication (e.g.


Shutdown

inline virtual void Shutdown() override

Close the external connection.


Restart

inline virtual void Restart()

Reset the Communication backend.

Source: Source/ScholaProtobuf/Public/ProtobufBackends/gRPC/ProducerRPCBackend.h