|
ewmscp
..
|
(abstract) class for reading a file An instance of this class is used to read data from a file vie the readBlock function. More...
#include <inputHandler.h>
Public Member Functions | |
| virtual | ~reader () noexcept(false)=default |
| virtual bool | setupSparseRegions (const std::string &) |
| set up internal list of data and hole regions, normally does nothing More... | |
| virtual bool | readBlock (block &b)=0 |
| read one block from the file More... | |
| virtual void | readBlockP (block &, size_t, off_t) |
| read one block from the file, starting at offset. More... | |
| virtual void | checkUnchangedness ()=0 |
| check if the file is unchanged by comparing cuttent stat to initial stat More... | |
| virtual void | seek (size_t) |
| like the standard seek, to be used only when appending new data to a file More... | |
Public Member Functions inherited from ioHandle | |
| ioHandle () | |
| virtual | ~ioHandle () noexcept(false) |
| virtual bool | parallelizable () const |
| tell if this handler is capable of parallel IO. Unsually not the case More... | |
| virtual void | setXattr (const std::string &, const std::string &) |
| virtual std::string | getXattr (const std::string &) |
| get one extended attribute value More... | |
| virtual void | removeXattr (const std::string &) |
| virtual size_t | getBlockSize () const |
| virtual void | setBlockSize (size_t newSize) |
| virtual std::unique_ptr< const genericStat > | getStat ()=0 |
| virtual std::unique_ptr< attrDataType > | getAttrData (const outputHandler::base *) |
| get attributes in the optimal way for setting with aOutputHandler More... | |
| virtual std::unique_ptr< acl::list > | getAclData () |
| get acls More... | |
Protected Member Functions | |
| reader (const genericStat &inititalStat) | |
Protected Member Functions inherited from unwindCheck | |
| unwindCheck ()=default | |
| ~unwindCheck ()=default | |
| bool | isUnwinding () const |
Protected Member Functions inherited from ioHandle | |
| ioHandle () | |
| virtual | ~ioHandle () noexcept(false) |
| virtual bool | parallelizable () const |
| tell if this handler is capable of parallel IO. Unsually not the case More... | |
| virtual void | setXattr (const std::string &, const std::string &) |
| virtual std::string | getXattr (const std::string &) |
| get one extended attribute value More... | |
| virtual void | removeXattr (const std::string &) |
| virtual size_t | getBlockSize () const |
| virtual void | setBlockSize (size_t newSize) |
| virtual std::unique_ptr< const genericStat > | getStat ()=0 |
| virtual std::unique_ptr< attrDataType > | getAttrData (const outputHandler::base *) |
| get attributes in the optimal way for setting with aOutputHandler More... | |
| virtual std::unique_ptr< acl::list > | getAclData () |
| get acls More... | |
Protected Attributes | |
| const genericStat & | readInitialStat |
| stat at beginning, needed for unchngedness check More... | |
| std::remove_const< decltype(readInitialStat.size)>::type | totalBytesRead = 0 |
| number of bytes read so far, needed for check on growing files More... | |
Protected Attributes inherited from ioHandle | |
| size_t | blockSize |
| in bytes, block size to be used when reading or writing More... | |
(abstract) class for reading a file An instance of this class is used to read data from a file vie the readBlock function.
Definition at line 72 of file inputHandler.h.
|
inlineprotected |
Definition at line 76 of file inputHandler.h.
|
virtualdefaultnoexcept |
| std::system_error | if close fails, e.g. data can't be written |
|
pure virtual |
check if the file is unchanged by comparing cuttent stat to initial stat
| delayAdvisingError | if file has changed according to size of mtime |
| std::system_error | if stat fails |
Implemented in inputHandler::posixFile::readerPosixFile, and inputHandler::dummy::readerDummy.
|
pure virtual |
read one block from the file
| std::system_error | if read fails |
| delayAdvisingError | if file changes during reading |
Implemented in inputHandler::posixFile::readerPosixFile, inputHandler::dummy::readerDummy, and inputHandler::Gpfs::readerGpfs.
Referenced by copyRequest::base::doUnthreadedCopy(), and copyRequest::base::reader().
|
inlinevirtual |
read one block from the file, starting at offset.
meant for pparallel reading, often not implemented only for non-sparse files
| std::system_error | if read fails |
| delayAdvisingError | if file changes during reading |
| std::logic_error | if attempted on sparse file |
Reimplemented in inputHandler::posixFile::readerPosixFile, inputHandler::dummy::readerDummy, and inputHandler::Gpfs::readerGpfs.
Definition at line 100 of file inputHandler.h.
Referenced by copyRequest::base::readWorker().
|
inlinevirtual |
like the standard seek, to be used only when appending new data to a file
| std::system_error | if seek fails |
| unimplementedActionError | if seek is not implemented (most input handlers) |
Reimplemented in inputHandler::posixFile::readerPosixFile.
Definition at line 112 of file inputHandler.h.
|
inlinevirtual |
set up internal list of data and hole regions, normally does nothing
Reimplemented in inputHandler::posixFile::readerPosixFile.
Definition at line 83 of file inputHandler.h.
|
protected |
stat at beginning, needed for unchngedness check
Definition at line 74 of file inputHandler.h.
Referenced by inputHandler::posixFile::readerPosixFile::readerPosixFile().
|
protected |
number of bytes read so far, needed for check on growing files
Definition at line 75 of file inputHandler.h.
1.8.17