ewmscp  ..
Classes | Public Member Functions | Protected Attributes | List of all members
ioHandle Class Referenceabstract

class as base for inputHandler::base::reader and outputHandler::base::writer containing the common parts of both classes More...

#include <ioHandle.h>

Inheritance diagram for ioHandle:
[legend]

Classes

class  attrDataType
 class for asttribute data, abstract base to be implemented for specific handlers More...
 

Public Member Functions

 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 genericStatgetStat ()=0
 
virtual std::unique_ptr< attrDataTypegetAttrData (const outputHandler::base *)
 get attributes in the optimal way for setting with aOutputHandler More...
 
virtual std::unique_ptr< acl::listgetAclData ()
 get acls More...
 

Protected Attributes

size_t blockSize
 in bytes, block size to be used when reading or writing More...
 

Detailed Description

class as base for inputHandler::base::reader and outputHandler::base::writer containing the common parts of both classes

Definition at line 15 of file ioHandle.h.

Constructor & Destructor Documentation

◆ ioHandle()

ioHandle::ioHandle ( )
inline

Definition at line 34 of file ioHandle.h.

34 : blockSize(16 * 1024 * 1024) {};

◆ ~ioHandle()

virtual ioHandle::~ioHandle ( )
inlinevirtualnoexcept

Definition at line 35 of file ioHandle.h.

35 {};

Member Function Documentation

◆ getAclData()

virtual std::unique_ptr<acl::list> ioHandle::getAclData ( )
inlinevirtual

get acls

Returns
std::unique_ptr to the acl data or nullptr if none available
Exceptions
std::system_errorwhen reading of acls fails

Reimplemented in gpfsIoCommon.

Definition at line 77 of file ioHandle.h.

77  {
78  return nullptr;
79  }

◆ getAttrData()

virtual std::unique_ptr<attrDataType> ioHandle::getAttrData ( const outputHandler::base )
inlinevirtual

get attributes in the optimal way for setting with aOutputHandler

Returns
std::unique_ptr to the attribute data or nullptr if none available
Exceptions
std::system_errorwhen reading of attributes fails

Reimplemented in daosFsIoCommon, posixFileIoCommon, and gpfsIoCommon.

Definition at line 69 of file ioHandle.h.

70  {
71  return nullptr;
72  };

Referenced by posixFileIoCommon::getAttrData().

Here is the caller graph for this function:

◆ getBlockSize()

virtual size_t ioHandle::getBlockSize ( ) const
inlinevirtual

Definition at line 58 of file ioHandle.h.

58  {
59  return (blockSize);
60  };

References blockSize.

Referenced by copyRequest::base::doBlockSizeSetup(), and outputHandler::Gpfs::writerGpfs::doSpecialFdHandling().

Here is the caller graph for this function:

◆ getStat()

virtual std::unique_ptr<const genericStat> ioHandle::getStat ( )
pure virtual

◆ getXattr()

virtual std::string ioHandle::getXattr ( const std::string &  )
inlinevirtual

get one extended attribute value

Returns
value or empty string if attribute not present
Exceptions
std::system_errorif attribute setting fails
unimplementedActionErrorif not implemented (most handlers)

Reimplemented in daosFsIoCommon, and posixFileIoCommon.

Definition at line 51 of file ioHandle.h.

52  {
53  throw unimplementedActionError("xattr getting not implemented");
54  };

Referenced by copyRequest::base::attrset(), and copyRequest::base::checkAttributes().

Here is the caller graph for this function:

◆ parallelizable()

virtual bool ioHandle::parallelizable ( ) const
inlinevirtual

tell if this handler is capable of parallel IO. Unsually not the case

Reimplemented in inputHandler::posixFile::readerPosixFile, outputHandler::daosFs::writerDaosFs, outputHandler::posixFile::writerPosixFile, inputHandler::dummy::readerDummy, inputHandler::daosFs::readerDaosFs, and inputHandler::davix::readerDavix.

Definition at line 38 of file ioHandle.h.

38  {
39  return false;
40  }

Referenced by copyRequest::base::doThreadedCopy(), copyRequest::base::reader(), and copyRequest::base::writeActor::writeActor().

Here is the caller graph for this function:

◆ removeXattr()

virtual void ioHandle::removeXattr ( const std::string &  )
inlinevirtual

Reimplemented in daosFsIoCommon, and posixFileIoCommon.

Definition at line 55 of file ioHandle.h.

55  {
56  throw unimplementedActionError("xattr removal not implemented");
57  };

Referenced by copyRequest::base::attrdel().

Here is the caller graph for this function:

◆ setBlockSize()

virtual void ioHandle::setBlockSize ( size_t  newSize)
inlinevirtual

Definition at line 61 of file ioHandle.h.

61  {
62  blockSize = newSize;
63  };

References blockSize.

Referenced by copyRequest::base::doBlockSizeSetup().

Here is the caller graph for this function:

◆ setXattr()

virtual void ioHandle::setXattr ( const std::string &  ,
const std::string &   
)
inlinevirtual

Reimplemented in daosFsIoCommon, and posixFileIoCommon.

Definition at line 43 of file ioHandle.h.

43  {
44  throw unimplementedActionError("xattr setting not implemented");
45  };

Referenced by copyRequest::base::attrset(), posixFileIoCommon::attrDataType::set(), and daosFsIoCommon::attrDataType::set().

Here is the caller graph for this function:

Member Data Documentation

◆ blockSize

size_t ioHandle::blockSize
protected

The documentation for this class was generated from the following file:
unimplementedActionError
class for exceptions that result from unimplemented functions Exceptions of this kind are to be throw...
Definition: copyRequestTypes.h:32
ioHandle::blockSize
size_t blockSize
in bytes, block size to be used when reading or writing
Definition: ioHandle.h:17