CernVM-FS  2.12.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
catalog::CatalogContext Struct Reference

#include <catalog_mgr.h>

Collaboration diagram for catalog::CatalogContext:

Public Member Functions

 CatalogContext ()
 
 CatalogContext (const shash::Any &hash, const PathString &mountpoint)
 
 CatalogContext (const shash::Any &hash, const PathString &mountpoint, const RootCatalogLocation location)
 
bool IsRootCatalog ()
 
std::string * GetSqlitePathPtr ()
 
shash::AnyGetHashPtr ()
 
shash::Any hash () const
 
PathString mountpoint () const
 
std::string sqlite_path () const
 
uint64_t root_ctlg_revision () const
 
RootCatalogLocation root_ctlg_location () const
 
manifest::ManifestEnsemblemanifest_ensemble () const
 
void SetHash (shash::Any hash)
 
void SetMountpoint (const PathString &mountpoint)
 
void SetSqlitePath (const std::string &sqlite_path)
 
void SetRootCtlgRevision (uint64_t root_ctlg_revision)
 
void SetRootCtlgLocation (RootCatalogLocation root_ctlg_location)
 
void TakeManifestEnsemble (manifest::ManifestEnsemble *manifest_ensemble)
 

Private Attributes

shash::Any hash_
 
PathString mountpoint_
 
std::string sqlite_path_
 
uint64_t root_ctlg_revision_
 
RootCatalogLocation root_ctlg_location_
 
UniquePtr
< manifest::ManifestEnsemble
manifest_ensemble_
 

Detailed Description

CatalogContext class contains all necessary information to load a catalog and also keeps track of the resulting output. It works as follows: 1) Load a new root catalog:

  • Use empty constructor CatalogContext()
  • Let the CatalogContext object be populated by GetNewRootCatalogContext()
    • This will set: hash, mountpoint, root_ctlg_revision, root_ctlg_location
  • Call LoadCatalogByHash()
    • This will set: sqlite_path 2) Load a catalog based on a given hash
  • Populate CatalogContext object; used constructor depends on catalog type
    • Root catalog: CatalogContext(shash::Any hash, PathString mountpoint, RootCatalogLocation location)
    • Nested catalog: CatalogContext(shash::Any hash, PathString mountpoint)
    • Note: in this case root_ctlg_revision is not used
  • Call LoadCatalogByHash()
    • This will set: sqlite_path

Definition at line 92 of file catalog_mgr.h.

Constructor & Destructor Documentation

catalog::CatalogContext::CatalogContext ( )
inline

Definition at line 94 of file catalog_mgr.h.

catalog::CatalogContext::CatalogContext ( const shash::Any hash,
const PathString mountpoint 
)
inline

Definition at line 101 of file catalog_mgr.h.

catalog::CatalogContext::CatalogContext ( const shash::Any hash,
const PathString mountpoint,
const RootCatalogLocation  location 
)
inline

Definition at line 109 of file catalog_mgr.h.

Member Function Documentation

shash::Any* catalog::CatalogContext::GetHashPtr ( )
inline

Definition at line 123 of file catalog_mgr.h.

std::string* catalog::CatalogContext::GetSqlitePathPtr ( )
inline

Definition at line 122 of file catalog_mgr.h.

Referenced by catalog::ClientCatalogManager::LoadCatalogByHash().

Here is the caller graph for this function:

bool catalog::CatalogContext::IsRootCatalog ( )
inline

Definition at line 118 of file catalog_mgr.h.

Referenced by catalog::ClientCatalogManager::LoadCatalogByHash(), and catalog::AbstractCatalogManager< CatalogT >::MountCatalog().

Here is the call graph for this function:

Here is the caller graph for this function:

manifest::ManifestEnsemble* catalog::CatalogContext::manifest_ensemble ( ) const
inline

Definition at line 131 of file catalog_mgr.h.

Referenced by catalog::ClientCatalogManager::LoadCatalogByHash(), and TakeManifestEnsemble().

Here is the call graph for this function:

Here is the caller graph for this function:

PathString catalog::CatalogContext::mountpoint ( ) const
inline
RootCatalogLocation catalog::CatalogContext::root_ctlg_location ( ) const
inline

Definition at line 129 of file catalog_mgr.h.

Referenced by catalog::ClientCatalogManager::LoadCatalogByHash(), and SetRootCtlgLocation().

Here is the caller graph for this function:

uint64_t catalog::CatalogContext::root_ctlg_revision ( ) const
inline

Definition at line 128 of file catalog_mgr.h.

Referenced by SetRootCtlgRevision().

Here is the caller graph for this function:

void catalog::CatalogContext::SetHash ( shash::Any  hash)
inline

Definition at line 134 of file catalog_mgr.h.

Referenced by catalog::SimpleCatalogManager::GetNewRootCatalogContext(), and catalog::ClientCatalogManager::GetNewRootCatalogContext().

Here is the call graph for this function:

Here is the caller graph for this function:

void catalog::CatalogContext::SetMountpoint ( const PathString mountpoint)
inline

Definition at line 135 of file catalog_mgr.h.

Referenced by catalog::SimpleCatalogManager::GetNewRootCatalogContext(), and catalog::ClientCatalogManager::GetNewRootCatalogContext().

Here is the call graph for this function:

Here is the caller graph for this function:

void catalog::CatalogContext::SetRootCtlgLocation ( RootCatalogLocation  root_ctlg_location)
inline

Definition at line 140 of file catalog_mgr.h.

Referenced by catalog::SimpleCatalogManager::GetNewRootCatalogContext(), and catalog::ClientCatalogManager::GetNewRootCatalogContext().

Here is the call graph for this function:

Here is the caller graph for this function:

void catalog::CatalogContext::SetRootCtlgRevision ( uint64_t  root_ctlg_revision)
inline

Definition at line 138 of file catalog_mgr.h.

Referenced by catalog::ClientCatalogManager::GetNewRootCatalogContext().

Here is the call graph for this function:

Here is the caller graph for this function:

void catalog::CatalogContext::SetSqlitePath ( const std::string &  sqlite_path)
inline

Definition at line 136 of file catalog_mgr.h.

Referenced by catalog::SimpleCatalogManager::LoadCatalogByHash().

Here is the call graph for this function:

Here is the caller graph for this function:

std::string catalog::CatalogContext::sqlite_path ( ) const
inline
void catalog::CatalogContext::TakeManifestEnsemble ( manifest::ManifestEnsemble manifest_ensemble)
inline

Gives ownership to CatalogContext

Definition at line 145 of file catalog_mgr.h.

Referenced by catalog::ClientCatalogManager::GetNewRootCatalogContext().

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

shash::Any catalog::CatalogContext::hash_
private

Definition at line 151 of file catalog_mgr.h.

Referenced by GetHashPtr(), hash(), and SetHash().

UniquePtr<manifest::ManifestEnsemble> catalog::CatalogContext::manifest_ensemble_
private

Definition at line 161 of file catalog_mgr.h.

Referenced by manifest_ensemble(), and TakeManifestEnsemble().

PathString catalog::CatalogContext::mountpoint_
private

Definition at line 153 of file catalog_mgr.h.

Referenced by IsRootCatalog(), mountpoint(), and SetMountpoint().

RootCatalogLocation catalog::CatalogContext::root_ctlg_location_
private

Definition at line 159 of file catalog_mgr.h.

Referenced by root_ctlg_location(), and SetRootCtlgLocation().

uint64_t catalog::CatalogContext::root_ctlg_revision_
private

Definition at line 157 of file catalog_mgr.h.

Referenced by root_ctlg_revision(), and SetRootCtlgRevision().

std::string catalog::CatalogContext::sqlite_path_
private

Definition at line 155 of file catalog_mgr.h.

Referenced by GetSqlitePathPtr(), SetSqlitePath(), and sqlite_path().


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