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]

List of all members.

Classes

struct  WriteQ
struct  WriteTask

Public Member Functions

 Cache (XrdOucCacheStats &)
 Constructor.
virtual XrdOucCacheIOAttach (XrdOucCacheIO *, int Options=0)
 Obtain a new IO object that fronts existing XrdOucCacheIO.
virtual int isAttached ()
 Number of cache-io objects atteched through this cache.
virtual XrdOucCacheCreate (XrdOucCache::Parms &, XrdOucCacheIO::aprParms *)
 Unused abstract method. Plugin instantiation role is given to the Factory class.

Static Public Member Functions

static void AddWriteTask (Prefetch *p, int ramBlockidx, size_t size, bool fromRead)
 Add downloaded block in write queue.
static bool HaveFreeWritingSlots ()
 Check write queue size is not over limit.
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.
static void ProcessWriteTasks ()
 Separate task which writes blocks from ram to disk.

Private Member Functions

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

Private Attributes

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

Static Private Attributes

static WriteQ s_writeQ

Friends

class IOEntireFile
class IOFileBlock

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 [inline, private]

Short log alias.

References XrdCl::DefaultEnv::GetLog().

virtual XrdOucCache* XrdFileCache::Cache::Create ( XrdOucCache::Parms ,
XrdOucCacheIO::aprParms  
) [inline, virtual]

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

central lock for this class

global cache usage statistics


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

Generated on 3 Oct 2016 for xrootd by  doxygen 1.6.1