XRootD
XrdPfc::Block Class Reference

#include <XrdPfcFile.hh>

+ Collaboration diagram for XrdPfc::Block:

Public Member Functions

 Block (File *f, IO *io, void *rid, char *buf, long long off, int size, int rsize, bool m_prefetch, bool cks_net)
 
char * get_buff () const
 
int get_error () const
 
Fileget_file () const
 
IOget_io () const
 
int get_n_cksum_errors ()
 
long long get_offset () const
 
void * get_req_id () const
 
int get_req_size () const
 
int get_size () const
 
bool has_cksums () const
 
bool is_failed () const
 
bool is_finished () const
 
bool is_ok () const
 
int * ptr_n_cksum_errors ()
 
vCkSum_tref_cksum_vec ()
 
bool req_cksum_net () const
 
void reset_error_and_set_io (IO *io, void *rid)
 
void set_downloaded ()
 
void set_error (int err)
 

Public Attributes

char * m_buff
 
vChunkRequest_t m_chunk_reqs
 
vCkSum_t m_cksum_vec
 
bool m_downloaded
 
int m_errno
 
Filem_file
 
IOm_io
 
int m_n_cksum_errors
 
long long m_offset
 
bool m_prefetch
 
int m_refcnt
 
bool m_req_cksum_net
 
void * m_req_id
 
int m_req_size
 
int m_size
 

Detailed Description

Definition at line 106 of file XrdPfcFile.hh.

Constructor & Destructor Documentation

◆ Block()

XrdPfc::Block::Block ( File f,
IO io,
void *  rid,
char *  buf,
long long  off,
int  size,
int  rsize,
bool  m_prefetch,
bool  cks_net 
)
inline

Definition at line 127 of file XrdPfcFile.hh.

128  :
129  m_file(f), m_io(io), m_req_id(rid),
130  m_buff(buf), m_offset(off), m_size(size), m_req_size(rsize),
132  m_req_cksum_net(cks_net), m_n_cksum_errors(0)
133  {}
int m_n_cksum_errors
Definition: XrdPfcFile.hh:123
void * m_req_id
Definition: XrdPfcFile.hh:111
long long m_offset
Definition: XrdPfcFile.hh:114
bool m_req_cksum_net
Definition: XrdPfcFile.hh:121

Member Function Documentation

◆ get_buff()

char* XrdPfc::Block::get_buff ( ) const
inline

Definition at line 135 of file XrdPfcFile.hh.

135 { return m_buff; }

References m_buff.

Referenced by XrdPfc::File::WriteBlockToDisk().

+ Here is the caller graph for this function:

◆ get_error()

int XrdPfc::Block::get_error ( ) const
inline

Definition at line 150 of file XrdPfcFile.hh.

150 { return m_errno; }

References m_errno.

◆ get_file()

File* XrdPfc::Block::get_file ( ) const
inline

Definition at line 140 of file XrdPfcFile.hh.

140 { return m_file; }

References m_file.

Referenced by XrdPfc::Cache::AddWriteTask().

+ Here is the caller graph for this function:

◆ get_io()

IO* XrdPfc::Block::get_io ( ) const
inline

Definition at line 141 of file XrdPfcFile.hh.

141 { return m_io; }

References m_io.

◆ get_n_cksum_errors()

int XrdPfc::Block::get_n_cksum_errors ( )
inline

Definition at line 162 of file XrdPfcFile.hh.

162 { return m_n_cksum_errors; }

References m_n_cksum_errors.

◆ get_offset()

long long XrdPfc::Block::get_offset ( ) const
inline

Definition at line 138 of file XrdPfcFile.hh.

138 { return m_offset; }

References m_offset.

◆ get_req_id()

void* XrdPfc::Block::get_req_id ( ) const
inline

Definition at line 142 of file XrdPfcFile.hh.

142 { return m_req_id; }

References m_req_id.

◆ get_req_size()

int XrdPfc::Block::get_req_size ( ) const
inline

Definition at line 137 of file XrdPfcFile.hh.

137 { return m_req_size; }

References m_req_size.

◆ get_size()

int XrdPfc::Block::get_size ( ) const
inline

Definition at line 136 of file XrdPfcFile.hh.

136 { return m_size; }

References m_size.

Referenced by XrdPfc::Cache::AddWriteTask(), XrdPfc::Cache::ProcessWriteTasks(), and XrdPfc::File::WriteBlockToDisk().

+ Here is the caller graph for this function:

◆ has_cksums()

bool XrdPfc::Block::has_cksums ( ) const
inline

Definition at line 160 of file XrdPfcFile.hh.

160 { return ! m_cksum_vec.empty(); }
vCkSum_t m_cksum_vec
Definition: XrdPfcFile.hh:122

References m_cksum_vec.

Referenced by XrdPfc::File::WriteBlockToDisk().

+ Here is the caller graph for this function:

◆ is_failed()

bool XrdPfc::Block::is_failed ( ) const
inline

Definition at line 146 of file XrdPfcFile.hh.

146 { return m_errno != 0; }

References m_errno.

◆ is_finished()

bool XrdPfc::Block::is_finished ( ) const
inline

Definition at line 144 of file XrdPfcFile.hh.

144 { return m_downloaded || m_errno != 0; }

References m_downloaded, and m_errno.

◆ is_ok()

bool XrdPfc::Block::is_ok ( ) const
inline

Definition at line 145 of file XrdPfcFile.hh.

145 { return m_downloaded; }

References m_downloaded.

◆ ptr_n_cksum_errors()

int* XrdPfc::Block::ptr_n_cksum_errors ( )
inline

Definition at line 163 of file XrdPfcFile.hh.

163 { return &m_n_cksum_errors; }

References m_n_cksum_errors.

◆ ref_cksum_vec()

vCkSum_t& XrdPfc::Block::ref_cksum_vec ( )
inline

Definition at line 161 of file XrdPfcFile.hh.

161 { return m_cksum_vec; }

References m_cksum_vec.

Referenced by XrdPfc::File::WriteBlockToDisk().

+ Here is the caller graph for this function:

◆ req_cksum_net()

bool XrdPfc::Block::req_cksum_net ( ) const
inline

Definition at line 159 of file XrdPfcFile.hh.

159 { return m_req_cksum_net; }

References m_req_cksum_net.

Referenced by XrdPfc::File::WriteBlockToDisk().

+ Here is the caller graph for this function:

◆ reset_error_and_set_io()

void XrdPfc::Block::reset_error_and_set_io ( IO io,
void *  rid 
)
inline

Definition at line 152 of file XrdPfcFile.hh.

153  {
154  m_errno = 0;
155  m_io = io;
156  m_req_id = rid;
157  }

References m_errno, m_io, and m_req_id.

◆ set_downloaded()

void XrdPfc::Block::set_downloaded ( )
inline

Definition at line 148 of file XrdPfcFile.hh.

148 { m_downloaded = true; }

References m_downloaded.

◆ set_error()

void XrdPfc::Block::set_error ( int  err)
inline

Definition at line 149 of file XrdPfcFile.hh.

149 { m_errno = err; }

References m_errno.

Member Data Documentation

◆ m_buff

char* XrdPfc::Block::m_buff

Definition at line 113 of file XrdPfcFile.hh.

Referenced by get_buff().

◆ m_chunk_reqs

vChunkRequest_t XrdPfc::Block::m_chunk_reqs

Definition at line 125 of file XrdPfcFile.hh.

◆ m_cksum_vec

vCkSum_t XrdPfc::Block::m_cksum_vec

Definition at line 122 of file XrdPfcFile.hh.

Referenced by has_cksums(), and ref_cksum_vec().

◆ m_downloaded

bool XrdPfc::Block::m_downloaded

Definition at line 119 of file XrdPfcFile.hh.

Referenced by is_finished(), is_ok(), and set_downloaded().

◆ m_errno

int XrdPfc::Block::m_errno

Definition at line 118 of file XrdPfcFile.hh.

Referenced by get_error(), is_failed(), is_finished(), reset_error_and_set_io(), and set_error().

◆ m_file

File* XrdPfc::Block::m_file

◆ m_io

IO* XrdPfc::Block::m_io

Definition at line 110 of file XrdPfcFile.hh.

Referenced by get_io(), and reset_error_and_set_io().

◆ m_n_cksum_errors

int XrdPfc::Block::m_n_cksum_errors

Definition at line 123 of file XrdPfcFile.hh.

Referenced by get_n_cksum_errors(), and ptr_n_cksum_errors().

◆ m_offset

long long XrdPfc::Block::m_offset

◆ m_prefetch

bool XrdPfc::Block::m_prefetch

Definition at line 120 of file XrdPfcFile.hh.

Referenced by XrdPfc::File::WriteBlockToDisk().

◆ m_refcnt

int XrdPfc::Block::m_refcnt

Definition at line 117 of file XrdPfcFile.hh.

◆ m_req_cksum_net

bool XrdPfc::Block::m_req_cksum_net

Definition at line 121 of file XrdPfcFile.hh.

Referenced by req_cksum_net().

◆ m_req_id

void* XrdPfc::Block::m_req_id

Definition at line 111 of file XrdPfcFile.hh.

Referenced by get_req_id(), and reset_error_and_set_io().

◆ m_req_size

int XrdPfc::Block::m_req_size

Definition at line 116 of file XrdPfcFile.hh.

Referenced by get_req_size().

◆ m_size

int XrdPfc::Block::m_size

Definition at line 115 of file XrdPfcFile.hh.

Referenced by get_size().


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