XRootD
XrdPfc::File Class Reference

#include <XrdPfcFile.hh>

+ Collaboration diagram for XrdPfc::File:

Public Member Functions

void AddIO (IO *io)
 
void BlockRemovedFromWriteQ (Block *)
 Handle removal of a block from Cache's write queue. More...
 
void BlocksRemovedFromWriteQ (std::list< Block * > &)
 Handle removal of a set of blocks from Cache's write queue. More...
 
int dec_ref_cnt ()
 
bool FinalizeSyncBeforeExit ()
 Returns true if any of blocks need sync. Called from Cache::dec_ref_cnt on zero ref cnt. More...
 
int Fstat (struct stat &sbuff)
 
int get_ref_cnt ()
 
size_t GetAccessCnt () const
 
int GetBlockSize () const
 
long long GetFileSize () const
 
const Info::AStatGetLastAccessStats () const
 
const std::string & GetLocalPath () const
 
XrdSysErrorGetLog () const
 
int GetNBlocks () const
 
int GetNDownloadedBlocks () const
 
int GetPrefetchCountOnIO (IO *io)
 
long long GetPrefetchedBytes () const
 
float GetPrefetchScore () const
 
std::string GetRemoteLocations () const
 
XrdSysTraceGetTrace () const
 
int inc_ref_cnt ()
 
long long initiate_emergency_shutdown ()
 
bool ioActive (IO *io)
 Initiate close. Return true if still IO active. Used in XrdPosixXrootd::Close() More...
 
void ioUpdated (IO *io)
 Notification from IO that it has been updated (remote open). More...
 
bool is_in_emergency_shutdown ()
 
const char * lPath () const
 Log path. More...
 
void Prefetch ()
 
int Read (IO *io, char *buff, long long offset, int size, ReadReqRH *rh)
 Normal read. More...
 
int ReadV (IO *io, const XrdOucIOVec *readV, int readVnum, ReadReqRH *rh)
 Vector read. More...
 
const StatsRefStats () const
 
void RemoveIO (IO *io)
 
void RequestSyncOfDetachStats ()
 Flags that detach stats should be written out in final sync. Called from CacheIO upon Detach. More...
 
void StopPrefetchingOnIO (IO *io)
 
void Sync ()
 Sync file cache inf o and output data with disk. More...
 
void WriteBlockToDisk (Block *b)
 

Static Public Member Functions

static FileFileOpen (const std::string &path, long long offset, long long fileSize, XrdOucCacheIO *inputIO)
 Static constructor that also does Open. Returns null ptr if Open fails. More...
 

Friends

class BlockResponseHandler
 
class Cache
 
class DirectResponseHandler
 

Detailed Description

Definition at line 202 of file XrdPfcFile.hh.

Member Function Documentation

◆ AddIO()

void XrdPfc::File::AddIO ( IO io)

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

+ Here is the caller graph for this function:

◆ BlockRemovedFromWriteQ()

void XrdPfc::File::BlockRemovedFromWriteQ ( Block )

Handle removal of a block from Cache's write queue.

◆ BlocksRemovedFromWriteQ()

void XrdPfc::File::BlocksRemovedFromWriteQ ( std::list< Block * > &  )

Handle removal of a set of blocks from Cache's write queue.

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

+ Here is the caller graph for this function:

◆ dec_ref_cnt()

int XrdPfc::File::dec_ref_cnt ( )
inline

Definition at line 288 of file XrdPfcFile.hh.

288 { return --m_ref_cnt; }

◆ FileOpen()

static File* XrdPfc::File::FileOpen ( const std::string &  path,
long long  offset,
long long  fileSize,
XrdOucCacheIO inputIO 
)
static

Static constructor that also does Open. Returns null ptr if Open fails.

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

+ Here is the caller graph for this function:

◆ FinalizeSyncBeforeExit()

bool XrdPfc::File::FinalizeSyncBeforeExit ( )

Returns true if any of blocks need sync. Called from Cache::dec_ref_cnt on zero ref cnt.

◆ Fstat()

int XrdPfc::File::Fstat ( struct stat sbuff)

Referenced by XrdPfc::Cache::ConsiderCached(), XrdPfc::IOFile::Fstat(), and XrdPfc::Cache::Stat().

+ Here is the caller graph for this function:

◆ get_ref_cnt()

int XrdPfc::File::get_ref_cnt ( )
inline

Definition at line 286 of file XrdPfcFile.hh.

286 { return m_ref_cnt; }

◆ GetAccessCnt()

size_t XrdPfc::File::GetAccessCnt ( ) const
inline

Definition at line 276 of file XrdPfcFile.hh.

276 { return m_cfi.GetAccessCnt(); }
size_t GetAccessCnt() const
Get number of accesses.
Definition: XrdPfcInfo.hh:261

References XrdPfc::Info::GetAccessCnt().

+ Here is the call graph for this function:

◆ GetBlockSize()

int XrdPfc::File::GetBlockSize ( ) const
inline

Definition at line 277 of file XrdPfcFile.hh.

277 { return m_cfi.GetBufferSize(); }
long long GetBufferSize() const
Get prefetch buffer size.
Definition: XrdPfcInfo.hh:469

References XrdPfc::Info::GetBufferSize().

+ Here is the call graph for this function:

◆ GetFileSize()

long long XrdPfc::File::GetFileSize ( ) const
inline

Definition at line 267 of file XrdPfcFile.hh.

267 { return m_file_size; }

Referenced by XrdPfc::IOFile::FSize().

+ Here is the caller graph for this function:

◆ GetLastAccessStats()

const Info::AStat* XrdPfc::File::GetLastAccessStats ( ) const
inline

Definition at line 275 of file XrdPfcFile.hh.

275 { return m_cfi.GetLastAccessStats(); }
const AStat * GetLastAccessStats() const
Get latest access stats.
Definition: XrdPfcInfo.cc:489

References XrdPfc::Info::GetLastAccessStats().

+ Here is the call graph for this function:

◆ GetLocalPath()

const std::string& XrdPfc::File::GetLocalPath ( ) const
inline

Definition at line 262 of file XrdPfcFile.hh.

262 { return m_filename; }

Referenced by XrdPfc::Cache::AddWriteTask(), and XrdPfc::Cache::ReleaseFile().

+ Here is the caller graph for this function:

◆ GetLog()

XrdSysError* XrdPfc::File::GetLog ( ) const

◆ GetNBlocks()

int XrdPfc::File::GetNBlocks ( ) const
inline

Definition at line 278 of file XrdPfcFile.hh.

278 { return m_cfi.GetNBlocks(); }
int GetNBlocks() const
Get number of blocks represented in download-state bit-vector.
Definition: XrdPfcInfo.hh:437

References XrdPfc::Info::GetNBlocks().

+ Here is the call graph for this function:

◆ GetNDownloadedBlocks()

int XrdPfc::File::GetNDownloadedBlocks ( ) const
inline

Definition at line 279 of file XrdPfcFile.hh.

279 { return m_cfi.GetNDownloadedBlocks(); }
int GetNDownloadedBlocks() const
Get number of downloaded blocks.
Definition: XrdPfcInfo.hh:398

References XrdPfc::Info::GetNDownloadedBlocks().

+ Here is the call graph for this function:

◆ GetPrefetchCountOnIO()

int XrdPfc::File::GetPrefetchCountOnIO ( IO io)

◆ GetPrefetchedBytes()

long long XrdPfc::File::GetPrefetchedBytes ( ) const
inline

Definition at line 280 of file XrdPfcFile.hh.

280 { return m_prefetch_bytes; }

◆ GetPrefetchScore()

float XrdPfc::File::GetPrefetchScore ( ) const

◆ GetRemoteLocations()

std::string XrdPfc::File::GetRemoteLocations ( ) const

◆ GetTrace()

XrdSysTrace* XrdPfc::File::GetTrace ( ) const

◆ inc_ref_cnt()

int XrdPfc::File::inc_ref_cnt ( )
inline

Definition at line 287 of file XrdPfcFile.hh.

287 { return ++m_ref_cnt; }

◆ initiate_emergency_shutdown()

long long XrdPfc::File::initiate_emergency_shutdown ( )

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

+ Here is the caller graph for this function:

◆ ioActive()

bool XrdPfc::File::ioActive ( IO io)

Initiate close. Return true if still IO active. Used in XrdPosixXrootd::Close()

Referenced by XrdPfc::IOFile::ioActive().

+ Here is the caller graph for this function:

◆ ioUpdated()

void XrdPfc::File::ioUpdated ( IO io)

Notification from IO that it has been updated (remote open).

Referenced by XrdPfc::IOFile::Update().

+ Here is the caller graph for this function:

◆ is_in_emergency_shutdown()

bool XrdPfc::File::is_in_emergency_shutdown ( )
inline

Definition at line 291 of file XrdPfcFile.hh.

291 { return m_in_shutdown; }

◆ lPath()

const char* XrdPfc::File::lPath ( ) const

Log path.

Referenced by XrdPfc::Cache::ProcessWriteTasks(), and XrdPfc::Cache::RemoveWriteQEntriesFor().

+ Here is the caller graph for this function:

◆ Prefetch()

void XrdPfc::File::Prefetch ( )

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

+ Here is the caller graph for this function:

◆ Read()

int XrdPfc::File::Read ( IO io,
char *  buff,
long long  offset,
int  size,
ReadReqRH rh 
)

Normal read.

Referenced by XrdPfc::IOFileBlock::Read().

+ Here is the caller graph for this function:

◆ ReadV()

int XrdPfc::File::ReadV ( IO io,
const XrdOucIOVec readV,
int  readVnum,
ReadReqRH rh 
)

Vector read.

◆ RefStats()

const Stats& XrdPfc::File::RefStats ( ) const
inline

Definition at line 281 of file XrdPfcFile.hh.

281 { return m_stats; }

◆ RemoveIO()

void XrdPfc::File::RemoveIO ( IO io)

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

+ Here is the caller graph for this function:

◆ RequestSyncOfDetachStats()

void XrdPfc::File::RequestSyncOfDetachStats ( )

Flags that detach stats should be written out in final sync. Called from CacheIO upon Detach.

Referenced by XrdPfc::IOFile::DetachFinalize().

+ Here is the caller graph for this function:

◆ StopPrefetchingOnIO()

void XrdPfc::File::StopPrefetchingOnIO ( IO io)

◆ Sync()

void XrdPfc::File::Sync ( )

Sync file cache inf o and output data with disk.

◆ WriteBlockToDisk()

void XrdPfc::File::WriteBlockToDisk ( Block b)

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

+ Here is the caller graph for this function:

Friends And Related Function Documentation

◆ BlockResponseHandler

friend class BlockResponseHandler
friend

Definition at line 205 of file XrdPfcFile.hh.

◆ Cache

friend class Cache
friend

Definition at line 204 of file XrdPfcFile.hh.

◆ DirectResponseHandler

friend class DirectResponseHandler
friend

Definition at line 206 of file XrdPfcFile.hh.


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