CernVM-FS
2.12.0
|
#include <catalog_mgr_ro.h>
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 () |
LoadReturn | RemountDryrun () |
LoadReturn | Remount () |
LoadReturn | 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 | GetTimestamp () 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 |
Catalog * | GetRootCatalog () const |
inode_t | MangleInode (const inode_t inode) const |
catalog::Counters | LookupCounters (const PathString &path, std::string *subcatalog_path, shash::Any *hash) |
Protected Member Functions | |
virtual LoadReturn | GetNewRootCatalogContext (CatalogContext *result) |
virtual LoadReturn | LoadCatalogByHash (CatalogContext *ctlg_context) |
virtual Catalog * | CreateCatalog (const PathString &mountpoint, const shash::Any &catalog_hash, Catalog *parent_catalog) |
const shash::Any & | base_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 |
virtual void | StageNestedCatalogByHash (const shash::Any &, const PathString &) |
void | StageNestedCatalogAndUnlock (const PathString &path, const Catalog *parent, bool is_listable) |
Catalog * | MountCatalog (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) |
Catalog * | LoadFreeCatalog (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 ¤t_tree) |
void | DetachAll () |
bool | IsAttached (const PathString &root_path, Catalog **attached_catalog) const |
Catalog * | FindCatalog (const PathString &path) const |
uint64_t | GetRevisionNoLock () const |
uint64_t | GetTimestampNoLock () 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_ |
download::DownloadManager * | download_manager_ |
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 |
Definition at line 32 of file catalog_mgr_ro.h.
|
inline |
Definition at line 34 of file catalog_mgr_ro.h.
|
inlineprotected |
Definition at line 55 of file catalog_mgr_ro.h.
Referenced by catalog::WritableCatalogManager::FinalizeCatalog().
|
protectedvirtual |
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.
mountpoint | the future mountpoint of the catalog to create |
catalog_hash | the content hash of the catalog database |
parent_catalog | the parent of the catalog to create |
Implements catalog::AbstractCatalogManager< Catalog >.
Reimplemented in catalog::WritableCatalogManager.
Definition at line 67 of file catalog_mgr_ro.cc.
|
inlineprotected |
Definition at line 57 of file catalog_mgr_ro.h.
Referenced by catalog::WritableCatalogManager::CreateNestedCatalog().
|
protectedvirtual |
Load the catalog and return a file name and the catalog hash.
GetNewRootCatalogContext() populates CatalogContext object with the information needed to retrieve the most recent root catalog independent of its location. The CatalogContext object must be populated with at least hash and mountpoint to call LoadCatalogByHash().
See class description of CatalogContext for more information.
Implements catalog::AbstractCatalogManager< Catalog >.
Definition at line 18 of file catalog_mgr_ro.cc.
|
protectedvirtual |
Loads a catalog via HTTP from Statum 0 into a temporary file. See CatalogContext class description for correct usage
Implements catalog::AbstractCatalogManager< Catalog >.
Definition at line 36 of file catalog_mgr_ro.cc.
|
inlineprotected |
Makes the given path relative to the catalog structure Paths coming out here can be used for lookups in catalogs
relativePath | the path to be mangled |
Definition at line 65 of file catalog_mgr_ro.h.
Referenced by catalog::WritableCatalogManager::AddChunkedFile(), catalog::WritableCatalogManager::AddDirectory(), catalog::WritableCatalogManager::AddFile(), catalog::WritableCatalogManager::AddHardlinkGroup(), catalog::WritableCatalogManager::Clone(), catalog::WritableCatalogManager::CloneTree(), catalog::WritableCatalogManager::CloneTreeImpl(), catalog::WritableCatalogManager::CreateNestedCatalog(), catalog::WritableCatalogManager::GetHostingCatalog(), catalog::WritableCatalogManager::IsTransitionPoint(), catalog::WritableCatalogManager::RemoveDirectory(), catalog::WritableCatalogManager::RemoveFile(), catalog::WritableCatalogManager::RemoveNestedCatalog(), catalog::WritableCatalogManager::ShrinkHardlinkGroup(), catalog::WritableCatalogManager::SwapNestedCatalog(), and catalog::WritableCatalogManager::TouchDirectory().
|
inlineprotected |
Definition at line 56 of file catalog_mgr_ro.h.
Referenced by catalog::WritableCatalogManager::Commit().
|
private |
Definition at line 70 of file catalog_mgr_ro.h.
Referenced by base_hash(), and set_base_hash().
|
private |
Definition at line 72 of file catalog_mgr_ro.h.
Referenced by dir_temp().
|
private |
Definition at line 73 of file catalog_mgr_ro.h.
|
private |
Definition at line 74 of file catalog_mgr_ro.h.
|
private |
Definition at line 71 of file catalog_mgr_ro.h.