CernVM-FS  2.12.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ExternalQuotaManager Class Reference

#include <cache_extern.h>

Inheritance diagram for ExternalQuotaManager:
Collaboration diagram for ExternalQuotaManager:

Classes

struct  QuotaInfo
 

Public Member Functions

virtual bool HasCapability (Capabilities capability)
 
virtual void Insert (const shash::Any &hash, const uint64_t size, const std::string &description)
 
virtual void InsertVolatile (const shash::Any &hash, const uint64_t size, const std::string &description)
 
virtual bool Pin (const shash::Any &hash, const uint64_t size, const std::string &description, const bool is_catalog)
 
virtual void Unpin (const shash::Any &hash)
 
virtual void Touch (const shash::Any &hash)
 
virtual void Remove (const shash::Any &file)
 
virtual bool Cleanup (const uint64_t leave_size)
 
virtual void RegisterBackChannel (int back_channel[2], const std::string &channel_id)
 
virtual void UnregisterBackChannel (int back_channel[2], const std::string &channel_id)
 
virtual std::vector< std::string > List ()
 
virtual std::vector< std::string > ListPinned ()
 
virtual std::vector< std::string > ListCatalogs ()
 
virtual std::vector< std::string > ListVolatile ()
 
virtual uint64_t GetMaxFileSize ()
 
virtual uint64_t GetCapacity ()
 
virtual uint64_t GetSize ()
 
virtual uint64_t GetSizePinned ()
 
virtual bool SetLimit (uint64_t limit)
 
virtual uint64_t GetCleanupRate (uint64_t period_s)
 
virtual void Spawn ()
 
virtual pid_t GetPid ()
 
virtual uint32_t GetProtocolRevision ()
 
- Public Member Functions inherited from QuotaManager
 QuotaManager ()
 
virtual ~QuotaManager ()
 
void BroadcastBackchannels (const std::string &message)
 

Static Public Member Functions

static ExternalQuotaManagerCreate (ExternalCacheManager *cache_mgr)
 

Private Member Functions

 ExternalQuotaManager (ExternalCacheManager *cache_mgr)
 
int GetInfo (QuotaInfo *quota_info)
 
bool DoListing (cvmfs::EnumObjectType type, std::vector< cvmfs::MsgListRecord > *result)
 

Private Attributes

ExternalCacheManagercache_mgr_
 

Additional Inherited Members

- Public Types inherited from QuotaManager
enum  Capabilities {
  kCapIntrospectSize = 0, kCapIntrospectCleanupRate, kCapList, kCapShrink,
  kCapListeners
}
 
- Static Public Attributes inherited from QuotaManager
static const uint32_t kProtocolRevision = 2
 
- Protected Member Functions inherited from QuotaManager
void LockBackChannels ()
 
void UnlockBackChannels ()
 
- Protected Attributes inherited from QuotaManager
std::map< shash::Md5, int > back_channels_
 
pthread_mutex_t * lock_back_channels_
 
uint32_t protocol_revision_
 

Detailed Description

Definition at line 309 of file cache_extern.h.

Constructor & Destructor Documentation

ExternalQuotaManager::ExternalQuotaManager ( ExternalCacheManager cache_mgr)
inlineexplicitprivate

Definition at line 360 of file cache_extern.h.

Referenced by Create().

Here is the caller graph for this function:

Member Function Documentation

bool ExternalQuotaManager::Cleanup ( const uint64_t  leave_size)
virtual

Implements QuotaManager.

Definition at line 906 of file cache_extern.cc.

Here is the call graph for this function:

ExternalQuotaManager * ExternalQuotaManager::Create ( ExternalCacheManager cache_mgr)
static

Definition at line 922 of file cache_extern.cc.

Referenced by FileSystem::SetupExternalCacheMgr().

Here is the call graph for this function:

Here is the caller graph for this function:

bool ExternalQuotaManager::DoListing ( cvmfs::EnumObjectType  type,
std::vector< cvmfs::MsgListRecord > *  result 
)
private

Definition at line 874 of file cache_extern.cc.

Referenced by List(), ListCatalogs(), ListPinned(), and ListVolatile().

Here is the call graph for this function:

Here is the caller graph for this function:

uint64_t ExternalQuotaManager::GetCapacity ( )
virtual

Implements QuotaManager.

Definition at line 955 of file cache_extern.cc.

Here is the call graph for this function:

uint64_t ExternalQuotaManager::GetCleanupRate ( uint64_t  period_s)
virtual

Implements QuotaManager.

Definition at line 964 of file cache_extern.cc.

Here is the call graph for this function:

int ExternalQuotaManager::GetInfo ( QuotaInfo quota_info)
private

Definition at line 933 of file cache_extern.cc.

Referenced by GetCapacity(), GetCleanupRate(), GetSize(), and GetSizePinned().

Here is the call graph for this function:

Here is the caller graph for this function:

virtual uint64_t ExternalQuotaManager::GetMaxFileSize ( )
inlinevirtual

Implements QuotaManager.

Definition at line 340 of file cache_extern.h.

virtual pid_t ExternalQuotaManager::GetPid ( )
inlinevirtual

Implements QuotaManager.

Definition at line 348 of file cache_extern.h.

Here is the call graph for this function:

virtual uint32_t ExternalQuotaManager::GetProtocolRevision ( )
inlinevirtual

Implements QuotaManager.

Definition at line 349 of file cache_extern.h.

uint64_t ExternalQuotaManager::GetSize ( )
virtual

Implements QuotaManager.

Definition at line 973 of file cache_extern.cc.

Here is the call graph for this function:

uint64_t ExternalQuotaManager::GetSizePinned ( )
virtual

Implements QuotaManager.

Definition at line 982 of file cache_extern.cc.

Here is the call graph for this function:

bool ExternalQuotaManager::HasCapability ( Capabilities  capability)
virtual

Implements QuotaManager.

Definition at line 991 of file cache_extern.cc.

virtual void ExternalQuotaManager::Insert ( const shash::Any hash,
const uint64_t  size,
const std::string &  description 
)
inlinevirtual

Implements QuotaManager.

Definition at line 314 of file cache_extern.h.

virtual void ExternalQuotaManager::InsertVolatile ( const shash::Any hash,
const uint64_t  size,
const std::string &  description 
)
inlinevirtual

Implements QuotaManager.

Definition at line 318 of file cache_extern.h.

vector< string > ExternalQuotaManager::List ( )
virtual

Implements QuotaManager.

Definition at line 1009 of file cache_extern.cc.

Here is the call graph for this function:

vector< string > ExternalQuotaManager::ListCatalogs ( )
virtual

Implements QuotaManager.

Definition at line 1021 of file cache_extern.cc.

Here is the call graph for this function:

vector< string > ExternalQuotaManager::ListPinned ( )
virtual

Implements QuotaManager.

Definition at line 1033 of file cache_extern.cc.

Here is the call graph for this function:

vector< string > ExternalQuotaManager::ListVolatile ( )
virtual

Implements QuotaManager.

Definition at line 1055 of file cache_extern.cc.

Here is the call graph for this function:

virtual bool ExternalQuotaManager::Pin ( const shash::Any hash,
const uint64_t  size,
const std::string &  description,
const bool  is_catalog 
)
inlinevirtual

Implements QuotaManager.

Definition at line 322 of file cache_extern.h.

void ExternalQuotaManager::RegisterBackChannel ( int  back_channel[2],
const std::string &  channel_id 
)
virtual

Implements QuotaManager.

Definition at line 1067 of file cache_extern.cc.

Here is the call graph for this function:

virtual void ExternalQuotaManager::Remove ( const shash::Any file)
inlinevirtual

Implements QuotaManager.

Definition at line 328 of file cache_extern.h.

virtual bool ExternalQuotaManager::SetLimit ( uint64_t  limit)
inlinevirtual

Implements QuotaManager.

Definition at line 344 of file cache_extern.h.

virtual void ExternalQuotaManager::Spawn ( )
inlinevirtual

Implements QuotaManager.

Definition at line 347 of file cache_extern.h.

virtual void ExternalQuotaManager::Touch ( const shash::Any hash)
inlinevirtual

Implements QuotaManager.

Definition at line 327 of file cache_extern.h.

virtual void ExternalQuotaManager::Unpin ( const shash::Any hash)
inlinevirtual

Implements QuotaManager.

Definition at line 326 of file cache_extern.h.

void ExternalQuotaManager::UnregisterBackChannel ( int  back_channel[2],
const std::string &  channel_id 
)
virtual

Implements QuotaManager.

Definition at line 1080 of file cache_extern.cc.

Here is the call graph for this function:

Member Data Documentation

ExternalCacheManager* ExternalQuotaManager::cache_mgr_
private

Definition at line 366 of file cache_extern.h.

Referenced by Cleanup(), DoListing(), GetInfo(), GetPid(), and HasCapability().


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