Designed to hold individual extents, but itself provide Extent-like capabilities Useful in cases of combining extends, or needing to hold a range of extends and extract information about (or aggregated from) the contained objects. Could be useful to inherit from Extent if improvements needed. More...
#include <BufferUtils.hh>
Public Member Functions | |
| ExtentHolder () | |
| ExtentHolder (const ExtentContainer &extents) | |
| ExtentHolder (size_t elements) | |
| reserve memory only | |
| ~ExtentHolder () | |
| Extent | asExtent () const |
| off_t | begin () const |
| size_t | bytesContained () const |
| size_t | bytesMissing () const |
| bool | empty () const |
| Total range in bytes of the extents. | |
| off_t | end () const |
| const ExtentContainer & | extents () const |
| ExtentContainer | getExtents () const |
| ExtentContainer | getSortedExtents () const |
| size_t | len () const |
| void | push_back (const Extent &in) |
| size_t | size () const |
| number of extent elements | |
| void | sort () |
| inplace sort by offset of contained extents | |
Protected Attributes | |
| off_t | m_begin {0} |
| off_t | m_end {0} |
| ExtentContainer | m_extents |
Designed to hold individual extents, but itself provide Extent-like capabilities Useful in cases of combining extends, or needing to hold a range of extends and extract information about (or aggregated from) the contained objects. Could be useful to inherit from Extent if improvements needed.
Definition at line 109 of file BufferUtils.hh.
| ExtentHolder::ExtentHolder | ( | ) |
Definition at line 81 of file BufferUtils.cc.
|
explicit |
reserve memory only
Definition at line 83 of file BufferUtils.cc.
References m_extents.
|
explicit |
Definition at line 88 of file BufferUtils.cc.
References extents(), m_extents, and push_back().
| ExtentHolder::~ExtentHolder | ( | ) |
| Extent ExtentHolder::asExtent | ( | ) | const |
Definition at line 114 of file BufferUtils.cc.
References m_begin, and m_end.
Referenced by bytesMissing().
|
inline |
Definition at line 117 of file BufferUtils.hh.
References m_begin.
Referenced by XrdCephOssReadVFile::ReadV().
| size_t ExtentHolder::bytesContained | ( | ) | const |
Definition at line 124 of file BufferUtils.cc.
References m_extents.
Referenced by bytesMissing(), XrdCephBuffer::XrdCephReadVBasic::convert(), and XrdCephOssReadVFile::ReadV().
| size_t ExtentHolder::bytesMissing | ( | ) | const |
Definition at line 132 of file BufferUtils.cc.
References asExtent(), bytesContained(), and XrdCephBuffer::Extent::len().
Referenced by XrdCephBuffer::XrdCephReadVBasic::convert(), and XrdCephOssReadVFile::ReadV().
|
inline |
Total range in bytes of the extents.
Definition at line 121 of file BufferUtils.hh.
References m_extents.
|
inline |
Definition at line 118 of file BufferUtils.hh.
References m_end.
Referenced by XrdCephOssReadVFile::ReadV().
|
inline |
Definition at line 133 of file BufferUtils.hh.
References m_extents.
Referenced by ExtentHolder(), XrdCephBuffer::XrdCephReadVBasic::convert(), and XrdCephBuffer::XrdCephReadVNoOp::convert().
| ExtentContainer ExtentHolder::getExtents | ( | ) | const |
Definition at line 151 of file BufferUtils.cc.
References m_extents.
| ExtentContainer ExtentHolder::getSortedExtents | ( | ) | const |
Definition at line 144 of file BufferUtils.cc.
References m_extents.
|
inline |
Definition at line 119 of file BufferUtils.hh.
References m_begin, and m_end.
Referenced by XrdCephOssReadVFile::ReadV().
| void ExtentHolder::push_back | ( | const Extent & | in | ) |
Definition at line 101 of file BufferUtils.cc.
References XrdCephBuffer::Extent::begin(), XrdCephBuffer::Extent::end(), m_begin, m_end, m_extents, and size().
Referenced by ExtentHolder(), XrdCephBuffer::XrdCephReadVBasic::convert(), XrdCephBuffer::XrdCephReadVNoOp::convert(), and XrdCephOssReadVFile::ReadV().
|
inline |
number of extent elements
Definition at line 122 of file BufferUtils.hh.
References m_extents.
Referenced by XrdCephBuffer::XrdCephReadVBasic::convert(), push_back(), and XrdCephOssReadVFile::ReadV().
| void ExtentHolder::sort | ( | ) |
inplace sort by offset of contained extents
Definition at line 139 of file BufferUtils.cc.
References m_extents.
|
protected |
Definition at line 144 of file BufferUtils.hh.
Referenced by asExtent(), begin(), len(), and push_back().
|
protected |
Definition at line 145 of file BufferUtils.hh.
Referenced by asExtent(), end(), len(), and push_back().
|
protected |
Definition at line 142 of file BufferUtils.hh.
Referenced by ExtentHolder(), ExtentHolder(), ~ExtentHolder(), bytesContained(), empty(), extents(), getExtents(), getSortedExtents(), push_back(), size(), and sort().