All Classes Namespaces Functions Variables Typedefs Enumerations Friends
Public Member Functions | List of all members
ucxx::InflightRequests Class Reference

Handle tracked requests. More...

#include <inflight_requests.h>

Public Member Functions

 InflightRequests ()=default
 Default constructor.
 
 InflightRequests (const InflightRequests &)=delete
 
InflightRequestsoperator= (InflightRequests const &)=delete
 
 InflightRequests (InflightRequests &&o)=delete
 
InflightRequestsoperator= (InflightRequests &&o)=delete
 
 ~InflightRequests ()
 Destructor. More...
 
size_t size ()
 Query the number of pending inflight requests. More...
 
void insert (std::shared_ptr< Request > request)
 Insert an inflight requests to the container. More...
 
void merge (TrackedRequestsPtr trackedRequests)
 Merge containers of inflight requests with the internal containers. More...
 
void remove (const Request *const request)
 Remove an inflight request from the internal container. More...
 
size_t cancelAll ()
 Issue cancelation of all inflight requests and clear the internal container. More...
 
TrackedRequestsPtr release ()
 Releases the internally-tracked containers. More...
 
size_t getCancelingSize ()
 Get count of requests in process of cancelation. More...
 

Detailed Description

Handle tracked requests.

Handle tracked requests, providing functionality so that its owner can modify those requests, performing operations such as insertion, removal and cancelation.

Constructor & Destructor Documentation

◆ ~InflightRequests()

ucxx::InflightRequests::~InflightRequests ( )

Destructor.

Cancels all inflight requests before destruction.

Member Function Documentation

◆ cancelAll()

size_t ucxx::InflightRequests::cancelAll ( )

Issue cancelation of all inflight requests and clear the internal container.

Issue cancelation of all inflight requests known to this object and clear the internal container. The total number of canceled requests is returned.

Returns
The total number of canceled requests.

◆ getCancelingSize()

size_t ucxx::InflightRequests::getCancelingSize ( )

Get count of requests in process of cancelation.

After cancelAll() is called the requests are scheduled for cancelation but may not complete immediately, therefore they are tracked until cancelation is completed. This method returns the count of requests in process of cancelation and drops references to those that have completed.

Returns
The count of requests that are in process of cancelation.

◆ insert()

void ucxx::InflightRequests::insert ( std::shared_ptr< Request request)

Insert an inflight requests to the container.

Parameters
[in]requesta std::shared_ptr<Request> with the inflight request.

◆ merge()

void ucxx::InflightRequests::merge ( TrackedRequestsPtr  trackedRequests)

Merge containers of inflight requests with the internal containers.

Merge containers of inflight requests obtained from InflightRequests::release() of another object with the internal containers.

Parameters
[in]trackedRequestscontainers of tracked inflight requests to merge with the internal tracked inflight requests.

◆ release()

TrackedRequestsPtr ucxx::InflightRequests::release ( )

Releases the internally-tracked containers.

Releases the internally-tracked containers that can be merged into another InflightRequests object with InflightRequests::merge(). Effectively leaves the internal state as a clean, new object.

Returns
The internally-tracked containers.

◆ remove()

void ucxx::InflightRequests::remove ( const Request *const  request)

Remove an inflight request from the internal container.

Remove the reference to a specific request from the internal container. This should be called when a request has completed and the InflightRequests owner does not need to keep track of it anymore. The raw pointer to a ucxx::Request is passed here as opposed to the usual std::shared_ptr<ucxx::Request> used elsewhere, this is because the raw pointer address is used as key to the requests reference, and this is called called from the object's destructor.

Parameters
[in]requestraw pointer to the request

◆ size()

size_t ucxx::InflightRequests::size ( )

Query the number of pending inflight requests.

Returns
The number of pending inflight requests.

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