|
xrootd
|
Object for reading out data from the PgRead response. More...
#include <XrdClAsyncPageReader.hh>
Classes | |
| struct | iovmax_t |
| Helper class for retrieving the maximum size of the I/O vector. More... | |
Public Member Functions | |
| AsyncPageReader (ChunkList &chunks, std::vector< uint32_t > &digests) | |
| virtual | ~AsyncPageReader () |
| Destructor. More... | |
| void | SetRsp (ServerResponseV2 *rsp) |
| Sets message data size. More... | |
| XRootDStatus | Read (Socket &socket, uint32_t &btsread) |
Private Member Functions | |
| void | addiov (char *&buf, size_t len) |
| Add I/O buffer to the vector. More... | |
| void | addiov (char *&buf, uint32_t len, uint32_t &dleft) |
| Add I/O buffer to the vector and update number of bytes left to be read. More... | |
| uint32_t | CalcRdSize () |
| Calculate the size of the data to be read. More... | |
| void | InitIOV () |
| Initialize the I/O vector. More... | |
| void | shift (void *&buffer, size_t nbbts) |
| Shift buffer by a number of bytes. More... | |
| void | shiftdgbuf (uint32_t &btsread) |
| void | shiftpgbuf (uint32_t &btsread) |
| void | ShiftIOV (uint32_t btsread) |
| shift the I/O vector by the number of bytes read More... | |
Static Private Member Functions | |
| static int | max_iovcnt () |
| static uint32_t | CalcIOVSize (uint32_t dleft) |
Private Attributes | |
| ChunkList & | chunks |
| std::vector< uint32_t > & | digests |
| uint32_t | dlen |
| uint64_t | rspoff |
| size_t | chindex |
| size_t | choff |
| size_t | dgindex |
| size_t | dgoff |
| std::vector< iovec > | iov |
| int | iovcnt |
| size_t | iovindex |
Static Private Attributes | |
| static const int | PageWithDigest = XrdSys::PageSize + sizeof( uint32_t ) |
Object for reading out data from the PgRead response.
|
inline |
Constructor
| chunks | : list of buffer for the data |
| digests | : a vector that will be filled with crc32c digest data |
References XrdOucPgrwUtils::csNum().
|
inlinevirtual |
Destructor.
|
inlineprivate |
|
inlineprivate |
Add I/O buffer to the vector and update number of bytes left to be read.
References addiov().
|
inlinestaticprivate |
Calculate the size of the I/O vector
| dleft | : data to be accomodated by the I/O vector |
References max_iovcnt(), and PageWithDigest.
Referenced by InitIOV().
|
inlineprivate |
|
inlineprivate |
Initialize the I/O vector.
References addiov(), XrdCl::ChunkInfo::buffer, CalcIOVSize(), CalcRdSize(), chindex, choff, chunks, dgindex, dgoff, digests, iovcnt, iovindex, max_iovcnt(), XrdCl::ChunkInfo::offset, XrdSys::PageSize, and PageWithDigest.
Referenced by Read().
|
inlinestaticprivate |
References XrdCl::AsyncPageReader::iovmax_t::value.
Referenced by CalcIOVSize(), and InitIOV().
|
inline |
Readout data from the socket
| socket | : the socket with the data |
| btsread | : number of user data read from the socket |
References chindex, chunks, XrdOucIOVec::data, dlen, InitIOV(), iovcnt, iovindex, XrdCl::Socket::ReadV(), ShiftIOV(), and XrdCl::suRetry.
|
inline |
Sets message data size.
References ServerResponseStatus::bdy, chindex, choff, chunks, dlen, ServerResponseBody_Status::dlen, ServerResponseV2::info, ServerResponseBody_pgRead::offset, ServerResponseV2::pgread, rspoff, and ServerResponseV2::status.
|
inlineprivate |
Shift buffer by a number of bytes.
Referenced by shiftdgbuf(), and shiftpgbuf().
|
inlineprivate |
|
inlineprivate |
shift the I/O vector by the number of bytes read
References chindex, choff, chunks, iovcnt, iovindex, shiftdgbuf(), and shiftpgbuf().
Referenced by Read().
|
inlineprivate |
shift page buffer by btsread
| btsread | : total number of bytes read (will be decremented by bytes shifted in buffer) |
References choff, iovcnt, iovindex, and shift().
Referenced by ShiftIOV().
|
private |
Referenced by CalcRdSize(), InitIOV(), Read(), SetRsp(), and ShiftIOV().
|
private |
Referenced by CalcRdSize(), InitIOV(), SetRsp(), ShiftIOV(), and shiftpgbuf().
|
private |
Referenced by CalcRdSize(), InitIOV(), Read(), SetRsp(), and ShiftIOV().
|
private |
Referenced by CalcRdSize(), InitIOV(), and shiftdgbuf().
|
private |
Referenced by CalcRdSize(), InitIOV(), and shiftdgbuf().
|
private |
Referenced by CalcRdSize(), InitIOV(), and shiftdgbuf().
|
private |
Referenced by CalcRdSize(), Read(), and SetRsp().
|
private |
|
private |
Referenced by addiov(), InitIOV(), Read(), shiftdgbuf(), ShiftIOV(), and shiftpgbuf().
|
private |
Referenced by InitIOV(), Read(), shiftdgbuf(), ShiftIOV(), and shiftpgbuf().
|
staticprivate |
Referenced by CalcIOVSize(), and InitIOV().
|
private |
Referenced by SetRsp().
1.8.5