|
xrootd
|
#include <XrdEcWrtBuff.hh>

Public Member Functions | |
| WrtBuff (const ObjCfg &objcfg) | |
| WrtBuff (WrtBuff &&wrtbuff) | |
| Move constructor. More... | |
| ~WrtBuff () | |
| uint32_t | Write (uint32_t size, const char *buffer) |
| void | Pad (uint32_t size) |
| char * | GetStrpBuff (uint8_t strpnb) |
| uint32_t | GetStrpSize (uint8_t strp) |
| uint32_t | GetBlkSize () |
| Get size of the data in the buffer. More... | |
| 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 | GetCrc32c (size_t strpnb) |
Private Attributes | |
| ObjCfg | objcfg |
| XrdCl::Buffer | wrtbuff |
| stripes_t | stripes |
| std::vector< std::future < uint32_t > > | cksums |
Write cache, accumulates full block and then calculates parity and all of it to the storage
|
inline |
Constructor
| objcfg | : data object configuration |
References XrdCl::Buffer::GetBuffer(), XrdCl::Buffer::GetSize(), XrdEc::ObjCfg::nbchunks, stripes, and wrtbuff.
|
inline |
Move constructor.
|
inline |
References XrdEc::BufferPool::Instance(), XrdEc::BufferPool::Recycle(), and wrtbuff.
|
inline |
True if the buffer if full, false otherwise.
References XrdEc::ObjCfg::datasize, XrdCl::Buffer::GetCursor(), objcfg, and wrtbuff.
|
inline |
True if there are no data in the buffer, false otherwise.
References XrdCl::Buffer::GetCursor(), XrdCl::Buffer::GetSize(), and wrtbuff.
|
inline |
Calculate the parity for the data stripes and the crc32cs.
References XrdEc::ObjCfg::chunksize, cksums, 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, XrdEc::ObjCfg::nbdata, objcfg, stripes, and wrtbuff.
|
inline |
Get size of the data in the buffer.
References XrdCl::Buffer::GetCursor(), and wrtbuff.
|
inline |
Calculate the crc32c for given data stripe
| strpnb | : number of the stripe |
References cksums.
|
inline |
Return buffer corresponding to given stripe
| strpnb | : number of the stripe |
References stripes.
|
inline |
Return size of the data in the given stripe
| strp | : number of the stripe |
References XrdEc::ObjCfg::chunksize, XrdCl::Buffer::GetCursor(), XrdEc::ObjCfg::nbdata, objcfg, and wrtbuff.
Referenced by Encode().
|
inline |
Pad the buffer with zeros.
| size | : number of zeros to be written into the buffer |
References XrdCl::Buffer::AdvanceCursor(), XrdCl::Buffer::Allocate(), XrdEc::ObjCfg::datasize, XrdCl::Buffer::GetBuffer(), XrdCl::Buffer::GetSize(), objcfg, XrdCl::Buffer::SetCursor(), and wrtbuff.
|
inline |
Write data into the buffer
| size | : number of bytes to be written |
| buffer | : buffer with data to be written |
References XrdCl::Buffer::AdvanceCursor(), XrdEc::ObjCfg::datasize, XrdCl::Buffer::GetBufferAtCursor(), XrdCl::Buffer::GetCursor(), objcfg, and wrtbuff.
|
private |
Referenced by Encode(), and GetCrc32c().
|
private |
Referenced by Complete(), Encode(), GetStrpSize(), Pad(), and Write().
|
private |
Referenced by Encode(), GetStrpBuff(), and WrtBuff().
|
private |
Referenced by Complete(), Empty(), Encode(), GetBlkSize(), GetStrpSize(), Pad(), Write(), WrtBuff(), and ~WrtBuff().
1.8.5