openPMD-api
|
Interface for communicating between logical and physically persistent data. More...
#include <AbstractIOHandler.hpp>
Public Member Functions | |
AbstractIOHandler (std::string path, Access at, MPI_Comm) | |
AbstractIOHandler (std::string path, Access at) | |
AbstractIOHandler (AbstractIOHandler const &)=default | |
AbstractIOHandler (AbstractIOHandler &&)=default | |
AbstractIOHandler & | operator= (AbstractIOHandler const &)=default |
AbstractIOHandler & | operator= (AbstractIOHandler &&)=default |
virtual void | enqueue (IOTask const &iotask) |
Add provided task to queue according to FIFO. More... | |
std::future< void > | flush (internal::FlushParams const &) |
Process operations in queue according to FIFO. More... | |
virtual std::future< void > | flush (internal::ParsedFlushParams &)=0 |
Process operations in queue according to FIFO. More... | |
virtual std::string | backendName () const =0 |
The currently used backend. | |
Public Attributes | |
std::string | directory |
Access | m_backendAccess |
Access | m_frontendAccess |
internal::SeriesStatus | m_seriesStatus = internal::SeriesStatus::Default |
std::queue< IOTask > | m_work |
bool | m_lastFlushSuccessful = false |
This is to avoid that the destructor tries flushing again if an error happened. More... | |
Friends | |
class | Series |
class | ADIOS2IOHandlerImpl |
class | detail::ADIOS2File |
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().
|
inlinevirtual |
Add provided task to queue according to FIFO.
iotask | Task to be executed after all previously enqueued IOTasks complete. |
Reimplemented in openPMD::DummyIOHandler.
std::future< void > openPMD::AbstractIOHandler::flush | ( | internal::FlushParams const & | params | ) |
Process operations in queue according to FIFO.
|
pure virtual |
Process operations in queue according to FIFO.
Implemented in openPMD::JSONIOHandler, openPMD::ParallelHDF5IOHandler, openPMD::HDF5IOHandler, openPMD::DummyIOHandler, and openPMD::ADIOS2IOHandler.
bool openPMD::AbstractIOHandler::m_lastFlushSuccessful = false |
This is to avoid that the destructor tries flushing again if an error happened.
Otherwise, this would lead to confusing error messages. Initialized as false, set to true after successful construction. If flushing results in an error, set this back to false. The destructor will only attempt flushing again if this is true.