xrootd
Classes | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | Friends | List of all members
XrdFileCache::Cache Class Reference

Attaches/creates and detaches/deletes cache-io objects for disk based cache. More...

#include <XrdFileCache.hh>

Inheritance diagram for XrdFileCache::Cache:
Inheritance graph
[legend]
Collaboration diagram for XrdFileCache::Cache:
Collaboration graph
[legend]

Classes

struct  WriteQ
 
struct  WriteTask
 

Public Member Functions

 Cache (XrdOucCacheStats &)
 Constructor. More...
 
virtual XrdOucCacheIOAttach (XrdOucCacheIO *, int Options=0)
 Obtain a new IO object that fronts existing XrdOucCacheIO. More...
 
virtual int isAttached ()
 Number of cache-io objects atteched through this cache. More...
 
virtual XrdOucCacheCreate (XrdOucCache::Parms &, XrdOucCacheIO::aprParms *)
 Unused abstract method. Plugin instantiation role is given to the Factory class. More...
 
- Public Member Functions inherited from XrdOucCache
virtual int Unlink (const char *)
 
virtual int Rmdir (const char *)
 
virtual int Rename (const char *, const char *)
 
virtual int Truncate (const char *, off_t)
 
 XrdOucCache ()
 
virtual ~XrdOucCache ()
 

Static Public Member Functions

static void AddWriteTask (Prefetch *p, int ramBlockidx, size_t size, bool fromRead)
 Add downloaded block in write queue. More...
 
static bool HaveFreeWritingSlots ()
 Check write queue size is not over limit. More...
 
static void RemoveWriteQEntriesFor (Prefetch *p)
 Remove blocks from write queue which belong to given prefetch. This method is used at the time of Prefetch destruction. More...
 
static void ProcessWriteTasks ()
 Separate task which writes blocks from ram to disk. More...
 

Private Member Functions

void Detach (XrdOucCacheIO *)
 Decrease attached count. Called from IO::Detach(). More...
 
void getFilePathFromURL (const char *url, std::string &res) const
 Transfor URL to path on local disk. More...
 
XrdCl::Log * clLog () const
 Short log alias. More...
 

Private Attributes

XrdSysMutex m_io_mutex
 central lock for this class More...
 
unsigned int m_attached
 number of attached IO objects More...
 
XrdOucCacheStatsm_stats
 global cache usage statistics More...
 

Static Private Attributes

static WriteQ s_writeQ
 

Friends

class IOEntireFile
 
class IOFileBlock
 

Additional Inherited Members

- Public Attributes inherited from XrdOucCache
XrdOucCacheStats Stats
 
- Static Public Attributes inherited from XrdOucCache
static const int optADB = 0x1000
 
static const int optFIS = 0x0001
 
static const int optFIU = 0x0002
 
static const int optRW = 0x0004
 
static const int optNEW = 0x0014
 
static const int optWIN = 0x0024
 
static const int isServer = 0x0010
 
static const int isStructured = 0x0020
 
static const int canPreRead = 0x0040
 
static const int logStats = 0x0080
 
static const int Serialized = 0x0004
 
static const int ioMTSafe = 0x0008
 
static const int Debug = 0x0003
 

Detailed Description

Attaches/creates and detaches/deletes cache-io objects for disk based cache.

Constructor & Destructor Documentation

XrdFileCache::Cache::Cache ( XrdOucCacheStats )

Constructor.

Member Function Documentation

static void XrdFileCache::Cache::AddWriteTask ( Prefetch p,
int  ramBlockidx,
size_t  size,
bool  fromRead 
)
static

Add downloaded block in write queue.

virtual XrdOucCacheIO* XrdFileCache::Cache::Attach ( XrdOucCacheIO ,
int  Options = 0 
)
virtual

Obtain a new IO object that fronts existing XrdOucCacheIO.

Implements XrdOucCache.

XrdCl::Log* XrdFileCache::Cache::clLog ( ) const
inlineprivate

Short log alias.

References XrdCl::DefaultEnv::GetLog().

virtual XrdOucCache* XrdFileCache::Cache::Create ( XrdOucCache::Parms ,
XrdOucCacheIO::aprParms  
)
inlinevirtual

Unused abstract method. Plugin instantiation role is given to the Factory class.

Implements XrdOucCache.

void XrdFileCache::Cache::Detach ( XrdOucCacheIO )
private

Decrease attached count. Called from IO::Detach().

void XrdFileCache::Cache::getFilePathFromURL ( const char *  url,
std::string &  res 
) const
private

Transfor URL to path on local disk.

static bool XrdFileCache::Cache::HaveFreeWritingSlots ( )
static

Check write queue size is not over limit.

virtual int XrdFileCache::Cache::isAttached ( )
virtual

Number of cache-io objects atteched through this cache.

Reimplemented from XrdOucCache.

static void XrdFileCache::Cache::ProcessWriteTasks ( )
static

Separate task which writes blocks from ram to disk.

static void XrdFileCache::Cache::RemoveWriteQEntriesFor ( Prefetch p)
static

Remove blocks from write queue which belong to given prefetch. This method is used at the time of Prefetch destruction.

Friends And Related Function Documentation

friend class IOEntireFile
friend
friend class IOFileBlock
friend

Member Data Documentation

unsigned int XrdFileCache::Cache::m_attached
private

number of attached IO objects

XrdSysMutex XrdFileCache::Cache::m_io_mutex
private

central lock for this class

XrdOucCacheStats& XrdFileCache::Cache::m_stats
private

global cache usage statistics

WriteQ XrdFileCache::Cache::s_writeQ
staticprivate

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