MXL : Media eXchange Layer
MXL
Loading...
Searching...
No Matches
mxl::lib::fabrics::ofi::Target Class Referenceabstract

Abstract base class for Target implementations. More...

#include <Target.hpp>

Inheritance diagram for mxl::lib::fabrics::ofi::Target:

Classes

struct  GrainReadResult
 Result of a read operation. More...
struct  ImmediateDataLocation
 Represent an immediate data. More...
struct  Interrupted
struct  SampleReadResult

Public Types

using ReadResult = std::variant<GrainReadResult, SampleReadResult, Interrupted>

Public Member Functions

virtual std::optional< ReadResult > read ()=0
 Determine if new data can be consumed.
virtual std::optional< ReadResult > readBlocking (std::chrono::steady_clock::duration timeout)=0
 Determine if new data can be consumed.
virtual void shutdown ()=0
 Shut down the target gracefully. Initiates a graceful shutdown of the target and blocks until the shutdown is complete. Can throw an exception if the shutdown is not successful. If this function throws the target can now longer be used.
virtual ~Target ()=default

Detailed Description

Abstract base class for Target implementations.

Definition at line 34 of file Target.hpp.

Member Typedef Documentation

◆ ReadResult

Constructor & Destructor Documentation

◆ ~Target()

virtual mxl::lib::fabrics::ofi::Target::~Target ( )
virtualdefault

Member Function Documentation

◆ read()

virtual std::optional< ReadResult > mxl::lib::fabrics::ofi::Target::read ( )
pure virtual

Determine if new data can be consumed.

A non-blocking operation that also drives the connection forward. Continuous invocation of this function is necessary for connection establishment and ongoing progress.

Implemented in mxl::lib::fabrics::ofi::RCTarget, and mxl::lib::fabrics::ofi::RDMTarget.

◆ readBlocking()

virtual std::optional< ReadResult > mxl::lib::fabrics::ofi::Target::readBlocking ( std::chrono::steady_clock::duration timeout)
pure virtual

Determine if new data can be consumed.

A blocking version of readGrain. see readGrain().

Implemented in mxl::lib::fabrics::ofi::RCTarget, and mxl::lib::fabrics::ofi::RDMTarget.

◆ shutdown()

virtual void mxl::lib::fabrics::ofi::Target::shutdown ( )
pure virtual

Shut down the target gracefully. Initiates a graceful shutdown of the target and blocks until the shutdown is complete. Can throw an exception if the shutdown is not successful. If this function throws the target can now longer be used.

Implemented in mxl::lib::fabrics::ofi::RCTarget, and mxl::lib::fabrics::ofi::RDMTarget.


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