olp-cpp-sdk  1.19.0
Public Member Functions | List of all members
olp::client::TaskContext::Impl Class Referenceabstract

An implementation helper interface used to declare the Execute, BlockingCancel, and CancelToken functions used by the TaskContext instance. More...

#include <TaskContext.h>

Inheritance diagram for olp::client::TaskContext::Impl:
Inheritance graph
[legend]

Public Member Functions

virtual void Execute ()=0
 Checks for the cancellation, executes the task, and calls the callback with the result or error.
 
virtual bool BlockingCancel (std::chrono::milliseconds timeout)=0
 Cancels the operation and waits for the notification. More...
 
virtual client::CancellationToken CancelToken ()=0
 Provides a token to cancel the task. More...
 

Detailed Description

An implementation helper interface used to declare the Execute, BlockingCancel, and CancelToken functions used by the TaskContext instance.

Member Function Documentation

◆ BlockingCancel()

virtual bool olp::client::TaskContext::Impl::BlockingCancel ( std::chrono::milliseconds  timeout)
pure virtual

Cancels the operation and waits for the notification.

Parameters
timeoutThe time (in milliseconds) to wait for the task to finish.
Returns
True if the notification is returned before the timeout; false otherwise.

Implemented in olp::client::TaskContext::TaskContextImpl< Response >.

◆ CancelToken()

virtual client::CancellationToken olp::client::TaskContext::Impl::CancelToken ( )
pure virtual

Provides a token to cancel the task.

Returns
The CancellationToken instance.

Implemented in olp::client::TaskContext::TaskContextImpl< Response >.


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