linkahead/file_transmission/upload_request_handler.h
-
namespace linkahead
-
namespace transaction
Creation and execution of transactions.
- Author
Timm Fitschen
- Date
2021-08-05
-
class UploadRequestHandler : public linkahead::transaction::HandlerInterface
Public Functions
-
UploadRequestHandler(HandlerTag tag, FileTransmissionService::Stub *stub, grpc::CompletionQueue *cq, FileDescriptor file_descriptor)
-
~UploadRequestHandler() override = default
-
UploadRequestHandler(const UploadRequestHandler&) = delete
-
UploadRequestHandler &operator=(const UploadRequestHandler&) = delete
-
UploadRequestHandler(UploadRequestHandler&&) = delete
-
UploadRequestHandler &operator=(UploadRequestHandler&&) = delete
-
inline virtual void Start() override
-
virtual bool OnNext(bool ok) override
-
virtual void Cancel() override
Protected Types
Protected Functions
-
void handleNewCallState()
-
void handleSendingHeaderState()
-
void handleSendingFileState()
-
void handleExpectingResponseState()
-
void handleCallCompleteState()
Protected Attributes
-
HandlerTag tag_
-
FileTransmissionService::Stub *stub_
-
grpc::CompletionQueue *cq_
-
grpc::ClientContext ctx_
-
std::unique_ptr<grpc::ClientAsyncWriter<FileUploadRequest>> rpc_
-
FileUploadRequest *request_
-
FileUploadResponse *response_
-
grpc::Status status_
-
std::unique_ptr<FileReader> fileReader_
-
FileDescriptor file_descriptor_
-
uint64_t bytesToSend_
-
UploadRequestHandler(HandlerTag tag, FileTransmissionService::Stub *stub, grpc::CompletionQueue *cq, FileDescriptor file_descriptor)
-
namespace transaction