openPMD-api
Public Member Functions | Public Attributes | List of all members
openPMD::AbstractIOHandler Class Referenceabstract

Interface for communicating between logical and physically persistent data. More...

#include <AbstractIOHandler.hpp>

Inheritance diagram for openPMD::AbstractIOHandler:
Inheritance graph
[legend]
Collaboration diagram for openPMD::AbstractIOHandler:
Collaboration graph
[legend]

Public Member Functions

 AbstractIOHandler (std::string path, Access at, MPI_Comm)
 
 AbstractIOHandler (std::string path, Access at)
 
virtual void enqueue (IOTask const &iotask)
 Add provided task to queue according to FIFO. More...
 
virtual std::future< void > flush ()=0
 Process operations in queue according to FIFO. More...
 
virtual std::string backendName () const =0
 The currently used backend.
 

Public Attributes

const std::string directory
 
const Access m_backendAccess
 
const Access m_frontendAccess
 
std::queue< IOTaskm_work
 
FlushLevel m_flushLevel = FlushLevel::InternalFlush
 

Detailed Description

Interface for communicating between logical and physically persistent data.

Input and output operations are channeled through a task queue that is managed by the concrete class implementing this handler. The queue of pending operations is only processed on demand. For certain scenarios it is therefore necessary to manually execute all operations by calling AbstractIOHandler::flush().

Member Function Documentation

◆ enqueue()

virtual void openPMD::AbstractIOHandler::enqueue ( IOTask const &  iotask)
inlinevirtual

Add provided task to queue according to FIFO.

Parameters
iotaskTask to be executed after all previously enqueued IOTasks complete.

Reimplemented in openPMD::ParallelADIOS1IOHandler, openPMD::ADIOS1IOHandler, and openPMD::DummyIOHandler.

◆ flush()

virtual std::future< void > openPMD::AbstractIOHandler::flush ( )
pure virtual

Process operations in queue according to FIFO.

Returns
Future indicating the completion state of the operation for backends that decide to implement this operation asynchronously.

Implemented in openPMD::ADIOS2IOHandler, openPMD::ParallelADIOS1IOHandler, openPMD::ADIOS1IOHandler, openPMD::ParallelHDF5IOHandler, openPMD::DummyIOHandler, openPMD::HDF5IOHandler, and openPMD::JSONIOHandler.


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