17 return ((pos >
begin()) && (pos <
end()));
31 if ((pos <
begin()) || (pos >=
end()))
34 if (off_t(pos +
len) >
end())
48 off_t subbeg = std::max(
begin(), pos);
49 off_t subend = std::min(
end(), off_t(pos +
len));
51 return Extent(subbeg, subend - subbeg);
65 if (
end() < rhs.
end() )
return true;
91 for (ExtentContainer::const_iterator vit =
m_extents.cbegin(); vit !=
m_extents.cend(); ++vit) {
126 for (ExtentContainer::const_iterator vit =
m_extents.cbegin(); vit !=
m_extents.cend(); ++vit) {
127 nbytes += vit->len();
135 return totalRange - bytesUsed;
147 std::sort(v.begin(), v.end());
162 m_start = std::chrono::steady_clock::now();
167 auto end = std::chrono::steady_clock::now();
168 m_output_val = std::chrono::duration_cast<std::chrono::nanoseconds>(end - m_start).count();
std::mutex cephbuf_iolock
size_t bytesContained() const
ExtentContainer getExtents() const
size_t size() const
number of extent elements
ExtentContainer getSortedExtents() const
void push_back(const Extent &in)
void sort()
inplace sort by offset of contained extents
size_t bytesMissing() const
const ExtentContainer & extents() const
ExtentContainer m_extents
off_t end() const
similar to stl vector end.
Extent containedExtent(off_t pos, size_t len) const
return the subset of range that is in this extent
off_t begin() const
Same as offset, but a bit more stl container like.
bool isContiguous(const Extent &rhs) const
bool operator==(const Extent &rhs) const
bool operator<(const Extent &rhs) const
bool allInExtent(off_t pos, size_t len) const
is all the range in this extent
bool in_extent(off_t pos) const
is this position within the range of this extent
Extent(off_t offset, size_t len)
Ecapsulates an offsets and length, with added functionaliyu Class that represents an offset possition...
bool someInExtent(off_t pos, size_t len) const
is some of the range in this extent
Timer_ns(long &output_ns)
RAII based timer information outputing a long value of ns Almost trivial class to time something and ...
is a simple implementation of IXrdCephBufferData using std::vector<char> representation for the buffe...
std::vector< Extent > ExtentContainer
Container defintion for Extents Typedef to provide a container of extents as a simple stl vector cont...