A collection of delayed request submissions. More...
#include <delayed_submission.h>
Public Member Functions | |
RequestDelayedSubmissionCollection (const std::string name, const bool enabled) | |
Constructor of a collection of delayed request submissions. More... | |
![]() | |
BaseDelayedSubmissionCollection (const std::string name, const bool enabled) | |
Constructor for a thread-safe delayed submission collection. More... | |
BaseDelayedSubmissionCollection (const BaseDelayedSubmissionCollection &)=delete | |
BaseDelayedSubmissionCollection (BaseDelayedSubmissionCollection &&o)=delete | |
BaseDelayedSubmissionCollection & | operator= (BaseDelayedSubmissionCollection const &)=delete |
BaseDelayedSubmissionCollection & | operator= (BaseDelayedSubmissionCollection &&o)=delete |
virtual ItemIdType | schedule (std::pair< std::shared_ptr< Request >, DelayedSubmissionCallbackType > item) |
Register a callable or complex-type for delayed submission. More... | |
void | process () |
Process all pending callbacks. More... | |
void | cancel (ItemIdType id) |
Cancel a pending callback. More... | |
Protected Member Functions | |
void | scheduleLog (ItemIdType id, std::pair< std::shared_ptr< Request >, DelayedSubmissionCallbackType > item) override |
Log message during schedule() . More... | |
void | processItem (ItemIdType id, std::pair< std::shared_ptr< Request >, DelayedSubmissionCallbackType > item) override |
Process a single item during process() . More... | |
Additional Inherited Members | |
![]() | |
std::string | _name |
The human-readable name of the collection, used for logging. | |
bool | _enabled |
Whether the resource required to process the collection is enabled. | |
ItemIdType | _itemId |
The item ID counter, used to allow cancelation. | |
std::optional< ItemIdType > | _processing |
The ID of the item being processed, if any. | |
std::deque< std::pair< ItemIdType, std::pair< std::shared_ptr< Request >, DelayedSubmissionCallbackType > > > | _collection |
The collection. | |
std::set< ItemIdType > | _canceled |
IDs of canceled items. | |
std::mutex | _mutex |
Mutex to provide access to _collection . | |
A collection of delayed request submissions.
A collection of delayed submissions used specifically for message transfer ucxx::Request
submissions.
|
explicit |
Constructor of a collection of delayed request submissions.
Construct a collection of delayed submissions used specifically for message transfer ucxx::Request
submissions.
[in] | name | the human-readable name of the type of delayed submission for debugging purposes. |
[in] | enabled | whether delayed request submissions should be enabled. |
|
overrideprotectedvirtual |
Process a single item during process()
.
Method called by process()
to process a single item of the collection.
[in] | id | the ID of the scheduled item, as returned by schedule() . |
[in] | item | the callback that was passed as argument to schedule() when the first registered. |
|
overrideprotectedvirtual |
Log message during schedule()
.
Log a specialized message while schedule()
is being executed.
[in] | id | the ID of the scheduled item, as returned by schedule() . |
[in] | item | the callback that was passed as argument to schedule() . |