CernVM-FS  2.9.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
catalog::SimpleCatalogManager Class Reference

#include <catalog_mgr_ro.h>

Inheritance diagram for catalog::SimpleCatalogManager:
Collaboration diagram for catalog::SimpleCatalogManager:

Public Member Functions

 SimpleCatalogManager (const shash::Any &base_hash, const std::string &stratum0, const std::string &dir_temp, download::DownloadManager *download_manager, perf::Statistics *statistics, const bool manage_catalog_files=false)
- Public Member Functions inherited from catalog::AbstractCatalogManager< Catalog >
 AbstractCatalogManager (perf::Statistics *statistics)
virtual ~AbstractCatalogManager ()
void SetInodeAnnotation (InodeAnnotation *new_annotation)
virtual bool Init ()
LoadError Remount (const bool dry_run)
LoadError ChangeRoot (const shash::Any &root_hash)
void DetachNested ()
bool LookupPath (const PathString &path, const LookupOptions options, DirectoryEntry *entry)
bool LookupPath (const std::string &path, const LookupOptions options, DirectoryEntry *entry)
bool LookupXattrs (const PathString &path, XattrList *xattrs)
bool LookupNested (const PathString &path, PathString *mountpoint, shash::Any *hash, uint64_t *size)
bool ListCatalogSkein (const PathString &path, std::vector< PathString > *result_list)
bool Listing (const PathString &path, DirectoryEntryList *listing, const bool expand_symlink)
bool Listing (const PathString &path, DirectoryEntryList *listing)
bool Listing (const std::string &path, DirectoryEntryList *listing)
bool ListingStat (const PathString &path, StatEntryList *listing)
bool ListFileChunks (const PathString &path, const shash::Algorithms interpret_hashes_as, FileChunkList *chunks)
void SetOwnerMaps (const OwnerMap &uid_map, const OwnerMap &gid_map)
void SetCatalogWatermark (unsigned limit)
shash::Any GetNestedCatalogHash (const PathString &mountpoint)
Statistics statistics () const
uint64_t inode_gauge ()
bool volatile_flag () const
uint64_t GetRevision () const
uint64_t GetTTL () const
bool HasExplicitTTL () const
bool GetVOMSAuthz (std::string *authz) const
int GetNumCatalogs () const
std::string PrintHierarchy () const
std::string PrintAllMemStatistics () const
inode_t GetRootInode () const
CatalogGetRootCatalog () const
inode_t MangleInode (const inode_t inode) const
catalog::Counters LookupCounters (const PathString &path, std::string *subcatalog_path)

Protected Member Functions

virtual LoadError LoadCatalog (const PathString &mountpoint, const shash::Any &hash, std::string *catalog_path, shash::Any *catalog_hash)
virtual CatalogCreateCatalog (const PathString &mountpoint, const shash::Any &catalog_hash, Catalog *parent_catalog)
const shash::Anybase_hash () const
void set_base_hash (const shash::Any &hash)
const std::string & dir_temp () const
std::string MakeRelativePath (const std::string &relative_path) const
- Protected Member Functions inherited from catalog::AbstractCatalogManager< Catalog >
virtual void UnloadCatalog (const Catalog *catalog)
virtual void ActivateCatalog (Catalog *catalog)
const std::vector< Catalog * > & GetCatalogs () const
CatalogMountCatalog (const PathString &mountpoint, const shash::Any &hash, Catalog *parent_catalog)
bool MountSubtree (const PathString &path, const Catalog *entry_point, bool can_listing, Catalog **leaf_catalog)
CatalogLoadFreeCatalog (const PathString &mountpoint, const shash::Any &hash)
bool AttachCatalog (const std::string &db_path, Catalog *new_catalog)
void DetachCatalog (Catalog *catalog)
void DetachSubtree (Catalog *catalog)
void DetachSiblings (const PathString &current_tree)
void DetachAll ()
bool IsAttached (const PathString &root_path, Catalog **attached_catalog) const
CatalogFindCatalog (const PathString &path) const
void ReadLock () const
void WriteLock () const
void Unlock () const
virtual void EnforceSqliteMemLimit ()
- Protected Member Functions inherited from SingleCopy
 SingleCopy ()

Private Attributes

shash::Any base_hash_
std::string stratum0_
std::string dir_temp_
const bool manage_catalog_files_

Additional Inherited Members

- Public Types inherited from catalog::AbstractCatalogManager< Catalog >
typedef std::vector< Catalog * > CatalogList
typedef Catalog catalog_t
- Static Public Attributes inherited from catalog::AbstractCatalogManager< Catalog >
static const inode_t kInodeOffset

Detailed Description

Definition at line 32 of file catalog_mgr_ro.h.

Constructor & Destructor Documentation

catalog::SimpleCatalogManager::SimpleCatalogManager ( const shash::Any base_hash,
const std::string &  stratum0,
const std::string &  dir_temp,
download::DownloadManager download_manager,
perf::Statistics statistics,
const bool  manage_catalog_files = false 

Definition at line 34 of file catalog_mgr_ro.h.

Member Function Documentation

const shash::Any& catalog::SimpleCatalogManager::base_hash ( ) const

Definition at line 57 of file catalog_mgr_ro.h.

Referenced by catalog::WritableCatalogManager::FinalizeCatalog().

Here is the caller graph for this function:

Catalog * catalog::SimpleCatalogManager::CreateCatalog ( const PathString mountpoint,
const shash::Any catalog_hash,
Catalog parent_catalog 

Create a new Catalog object. Every derived class has to implement this and return a newly created (derived) Catalog structure of it's desired type.

mountpointthe future mountpoint of the catalog to create
catalog_hashthe content hash of the catalog database
parent_catalogthe parent of the catalog to create
a newly created (derived) Catalog

Implements catalog::AbstractCatalogManager< Catalog >.

Reimplemented in catalog::WritableCatalogManager.

Definition at line 56 of file

Here is the call graph for this function:

const std::string& catalog::SimpleCatalogManager::dir_temp ( ) const

Definition at line 59 of file catalog_mgr_ro.h.

Referenced by catalog::WritableCatalogManager::CreateNestedCatalog().

Here is the caller graph for this function:

LoadError catalog::SimpleCatalogManager::LoadCatalog ( const PathString mountpoint,
const shash::Any hash,
std::string *  catalog_path,
shash::Any catalog_hash 

Loads a catalog via HTTP from Statum 0 into a temporary file.

url_paththe url of the catalog to load
mount_pointthe file system path where the catalog should be mounted
catalog_filea pointer to the string containing the full qualified name of the catalog afterwards
0 on success, different otherwise

Implements catalog::AbstractCatalogManager< Catalog >.

Definition at line 25 of file

Here is the call graph for this function:

void catalog::SimpleCatalogManager::set_base_hash ( const shash::Any hash)

Definition at line 58 of file catalog_mgr_ro.h.

Referenced by catalog::WritableCatalogManager::Commit().

Here is the caller graph for this function:

Member Data Documentation

shash::Any catalog::SimpleCatalogManager::base_hash_

Definition at line 72 of file catalog_mgr_ro.h.

Referenced by base_hash(), and set_base_hash().

std::string catalog::SimpleCatalogManager::dir_temp_

Definition at line 74 of file catalog_mgr_ro.h.

Referenced by dir_temp().

download::DownloadManager* catalog::SimpleCatalogManager::download_manager_

Definition at line 75 of file catalog_mgr_ro.h.

const bool catalog::SimpleCatalogManager::manage_catalog_files_

Definition at line 76 of file catalog_mgr_ro.h.

std::string catalog::SimpleCatalogManager::stratum0_

Definition at line 73 of file catalog_mgr_ro.h.

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