![]() |
XRootD
|
#include <XrdEcWrtBuff.hh>
Public Member Functions | |
WrtBuff (const ObjCfg &objcfg) | |
WrtBuff (WrtBuff &&wrtbuff) | |
Move constructor. More... | |
~WrtBuff () | |
bool | Complete () |
True if the buffer if full, false otherwise. More... | |
bool | Empty () |
True if there are no data in the buffer, false otherwise. More... | |
void | Encode () |
Calculate the parity for the data stripes and the crc32cs. More... | |
uint32_t | GetBlkSize () |
Get size of the data in the buffer. More... | |
uint32_t | GetCrc32c (size_t strpnb) |
char * | GetStrpBuff (uint8_t strpnb) |
uint32_t | GetStrpSize (uint8_t strp) |
void | Pad (uint32_t size) |
uint32_t | Write (uint32_t size, const char *buffer) |
Write cache, accumulates full block and then calculates parity and all of it to the storage
Definition at line 132 of file XrdEcWrtBuff.hh.
|
inline |
Constructor
objcfg | : data object configuration |
Definition at line 140 of file XrdEcWrtBuff.hh.
References XrdCl::Buffer::GetBuffer(), XrdCl::Buffer::GetSize(), and XrdEc::ObjCfg::nbchunks.
|
inline |
Move constructor.
Definition at line 149 of file XrdEcWrtBuff.hh.
|
inline |
Definition at line 158 of file XrdEcWrtBuff.hh.
References XrdEc::BufferPool::Instance(), and XrdEc::BufferPool::Recycle().
|
inline |
True if the buffer if full, false otherwise.
Definition at line 243 of file XrdEcWrtBuff.hh.
References XrdEc::ObjCfg::datasize, and XrdCl::Buffer::GetCursor().
|
inline |
True if there are no data in the buffer, false otherwise.
Definition at line 250 of file XrdEcWrtBuff.hh.
References XrdCl::Buffer::GetCursor(), and XrdCl::Buffer::GetSize().
|
inline |
Calculate the parity for the data stripes and the crc32cs.
Definition at line 257 of file XrdEcWrtBuff.hh.
References XrdEc::ObjCfg::chunksize, XrdEc::RedundancyProvider::compute(), XrdEc::ObjCfg::digest, XrdEc::ThreadPool::Execute(), XrdCl::Buffer::GetBuffer(), XrdEc::Config::GetRedundancy(), GetStrpSize(), XrdEc::Config::Instance(), XrdEc::ThreadPool::Instance(), XrdEc::ObjCfg::nbchunks, and XrdEc::ObjCfg::nbdata.
|
inline |
Get size of the data in the buffer.
Definition at line 236 of file XrdEcWrtBuff.hh.
References XrdCl::Buffer::GetCursor().
|
inline |
Calculate the crc32c for given data stripe
strpnb | : number of the stripe |
Definition at line 280 of file XrdEcWrtBuff.hh.
|
inline |
Return buffer corresponding to given stripe
strpnb | : number of the stripe |
Definition at line 202 of file XrdEcWrtBuff.hh.
|
inline |
Return size of the data in the given stripe
strp | : number of the stripe |
Definition at line 211 of file XrdEcWrtBuff.hh.
References XrdEc::ObjCfg::chunksize, XrdCl::Buffer::GetCursor(), and XrdEc::ObjCfg::nbdata.
Referenced by Encode().
|
inline |
Pad the buffer with zeros.
size | : number of zeros to be written into the buffer |
Definition at line 183 of file XrdEcWrtBuff.hh.
References XrdCl::Buffer::AdvanceCursor(), XrdCl::Buffer::Allocate(), XrdEc::ObjCfg::datasize, XrdCl::Buffer::GetBuffer(), XrdCl::Buffer::GetSize(), and XrdCl::Buffer::SetCursor().
|
inline |
Write data into the buffer
size | : number of bytes to be written |
buffer | : buffer with data to be written |
Definition at line 169 of file XrdEcWrtBuff.hh.
References XrdCl::Buffer::AdvanceCursor(), XrdEc::ObjCfg::datasize, XrdCl::Buffer::GetBufferAtCursor(), and XrdCl::Buffer::GetCursor().