xrootd
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
XrdCl::ZipCache Class Reference

Utility class for inflating a compressed buffer. More...

#include <XrdClZipCache.hh>

Classes

struct  greater_read_resp_t
 

Public Types

typedef std::vector< char > buffer_t
 

Public Member Functions

 ZipCache ()
 
 ~ZipCache ()
 
void QueueReq (uint64_t offset, uint32_t length, void *buffer, ResponseHandler *handler)
 
void QueueRsp (const XRootDStatus &st, uint64_t offset, buffer_t &&buffer)
 

Private Types

typedef std::tuple< uint64_t, uint32_t, void *, ResponseHandler * > read_args_t
 
typedef std::tuple< XRootDStatus, uint64_t, buffer_tread_resp_t
 
typedef std::priority_queue< read_resp_t, std::vector< read_resp_t >, greater_read_resp_tresp_queue_t
 

Private Member Functions

bool HasInput () const
 
bool HasOutput () const
 
void Input (const read_resp_t &rdrsp)
 
void Output (const read_args_t &rdreq)
 
bool Consecutive (const read_resp_t &resp) const
 
void Decompress ()
 
void CallHandler (const XRootDStatus &st)
 
XrdCl::XRootDStatus ToXRootDStatus (int rc, const std::string &func)
 

Static Private Member Functions

static AnyObjectPkgRsp (ChunkInfo *chunk)
 

Private Attributes

z_stream strm
 
std::mutex mtx
 
uint64_t inabsoff
 
std::queue< read_args_trdreqs
 
resp_queue_t rdrsps
 

Detailed Description

Utility class for inflating a compressed buffer.

Member Typedef Documentation

◆ buffer_t

typedef std::vector<char> XrdCl::ZipCache::buffer_t

◆ read_args_t

typedef std::tuple<uint64_t, uint32_t, void*, ResponseHandler*> XrdCl::ZipCache::read_args_t
private

◆ read_resp_t

typedef std::tuple<XRootDStatus, uint64_t, buffer_t> XrdCl::ZipCache::read_resp_t
private

◆ resp_queue_t

typedef std::priority_queue<read_resp_t, std::vector<read_resp_t>, greater_read_resp_t> XrdCl::ZipCache::resp_queue_t
private

Constructor & Destructor Documentation

◆ ZipCache()

XrdCl::ZipCache::ZipCache ( )
inline

◆ ~ZipCache()

XrdCl::ZipCache::~ZipCache ( )
inline

References strm.

Member Function Documentation

◆ CallHandler()

void XrdCl::ZipCache::CallHandler ( const XRootDStatus st)
inlineprivate

◆ Consecutive()

bool XrdCl::ZipCache::Consecutive ( const read_resp_t resp) const
inlineprivate

References inabsoff.

Referenced by Decompress().

◆ Decompress()

void XrdCl::ZipCache::Decompress ( )
inlineprivate

◆ HasInput()

bool XrdCl::ZipCache::HasInput ( ) const
inlineprivate

References strm.

Referenced by Decompress().

◆ HasOutput()

bool XrdCl::ZipCache::HasOutput ( ) const
inlineprivate

References strm.

Referenced by Decompress().

◆ Input()

void XrdCl::ZipCache::Input ( const read_resp_t rdrsp)
inlineprivate

References strm.

Referenced by Decompress().

◆ Output()

void XrdCl::ZipCache::Output ( const read_args_t rdreq)
inlineprivate

References strm.

Referenced by Decompress().

◆ PkgRsp()

static AnyObject * XrdCl::ZipCache::PkgRsp ( ChunkInfo chunk)
inlinestaticprivate

References XrdCl::AnyObject::Set().

Referenced by CallHandler().

◆ QueueReq()

void XrdCl::ZipCache::QueueReq ( uint64_t  offset,
uint32_t  length,
void *  buffer,
ResponseHandler handler 
)
inline

References Decompress(), mtx, and rdreqs.

◆ QueueRsp()

void XrdCl::ZipCache::QueueRsp ( const XRootDStatus st,
uint64_t  offset,
buffer_t &&  buffer 
)
inline

References Decompress(), mtx, and rdrsps.

◆ ToXRootDStatus()

XrdCl::XRootDStatus XrdCl::ZipCache::ToXRootDStatus ( int  rc,
const std::string &  func 
)
inlineprivate

Member Data Documentation

◆ inabsoff

uint64_t XrdCl::ZipCache::inabsoff
private

Referenced by Consecutive(), and Decompress().

◆ mtx

std::mutex XrdCl::ZipCache::mtx
private

Referenced by QueueReq(), and QueueRsp().

◆ rdreqs

std::queue<read_args_t> XrdCl::ZipCache::rdreqs
private

Referenced by CallHandler(), Decompress(), and QueueReq().

◆ rdrsps

resp_queue_t XrdCl::ZipCache::rdrsps
private

Referenced by Decompress(), and QueueRsp().

◆ strm

z_stream XrdCl::ZipCache::strm
private

The documentation for this class was generated from the following file: