CernVM-FS  2.9.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
LocalObjectFetcher< CatalogT, HistoryT, ReflogT > Class Template Reference

#include <object_fetcher.h>

Inheritance diagram for LocalObjectFetcher< CatalogT, HistoryT, ReflogT >:
Collaboration diagram for LocalObjectFetcher< CatalogT, HistoryT, ReflogT >:

Public Types

typedef BaseTN::Failures Failures
 
- Public Types inherited from AbstractObjectFetcher< LocalObjectFetcher< CatalogT, HistoryT, ReflogT > >
typedef object_fetcher_traits
< LocalObjectFetcher< CatalogT,
HistoryT, ReflogT >
>::CatalogTN 
CatalogTN
 
typedef object_fetcher_traits
< LocalObjectFetcher< CatalogT,
HistoryT, ReflogT >
>::HistoryTN 
HistoryTN
 
typedef object_fetcher_traits
< LocalObjectFetcher< CatalogT,
HistoryT, ReflogT >
>::ReflogTN 
ReflogTN
 
typedef
ObjectFetcherFailures::Failures 
Failures
 
- Public Types inherited from ObjectFetcherFailures
enum  Failures {
  kFailOk, kFailNotFound, kFailLocalIO, kFailNetwork,
  kFailDecompression, kFailManifestNameMismatch, kFailManifestSignatureMismatch, kFailBadData,
  kFailUnknown, kFailNumEntries
}
 

Public Member Functions

 LocalObjectFetcher (const std::string &base_path, const std::string &temp_dir)
 
Failures FetchManifest (manifest::Manifest **manifest)
 
std::string GetUrl (const shash::Any &hash) const
 
Failures Fetch (const shash::Any &object_hash, std::string *file_path)
 
Failures Fetch (const std::string &relative_path, const bool decompress, const bool, std::string *file_path)
 
- Public Member Functions inherited from AbstractObjectFetcher< LocalObjectFetcher< CatalogT, HistoryT, ReflogT > >
Failures FetchManifest (manifest::Manifest **manifest)
 
Failures FetchManifest (UniquePtr< manifest::Manifest > *manifest)
 
Failures FetchHistory (HistoryTN **history, const shash::Any &history_hash=shash::Any())
 
Failures FetchHistory (UniquePtr< HistoryTN > *history, const shash::Any &history_hash=shash::Any())
 
Failures FetchCatalog (const shash::Any &catalog_hash, const std::string &catalog_path, CatalogTN **catalog, const bool is_nested=false, CatalogTN *parent=NULL)
 
Failures FetchCatalog (const shash::Any &catalog_hash, const std::string &catalog_path, UniquePtr< CatalogTN > *catalog, const bool is_nested=false, CatalogTN *parent=NULL)
 
Failures FetchReflog (const shash::Any &reflog_hash, ReflogTN **reflog)
 
Failures FetchReflog (const shash::Any &reflog_hash, UniquePtr< ReflogTN > *reflog)
 
std::string GetUrl (const shash::Any &hash) const
 
bool HasHistory ()
 
const std::string & temporary_directory () const
 

Protected Types

typedef LocalObjectFetcher
< CatalogT, HistoryT, ReflogT > 
ThisTN
 
typedef AbstractObjectFetcher
< ThisTN
BaseTN
 

Protected Member Functions

std::string BuildPath (const std::string &relative_path) const
 
std::string BuildRelativePath (const shash::Any &hash) const
 
- Protected Member Functions inherited from AbstractObjectFetcher< LocalObjectFetcher< CatalogT, HistoryT, ReflogT > >
 AbstractObjectFetcher (const std::string &temp_dir)
 
Failures Fetch (const shash::Any &object_hash, std::string *file_path)
 
Failures Fetch (const std::string &relative_path, const bool decompress, const bool nocache, std::string *file_path)
 
shash::Any GetHistoryHash ()
 

Private Attributes

const std::string base_path_
 

Additional Inherited Members

- Static Public Attributes inherited from AbstractObjectFetcher< LocalObjectFetcher< CatalogT, HistoryT, ReflogT > >
static const std::string kManifestFilename
 
static const std::string kReflogFilename
 

Detailed Description

template<class CatalogT = catalog::Catalog, class HistoryT = history::SqliteHistory, class ReflogT = manifest::Reflog>
class LocalObjectFetcher< CatalogT, HistoryT, ReflogT >

This is an AbstractObjectFetcher<> accessing locally stored repository files. Note that this implementation does not take care of any repository signature verification.

Definition at line 329 of file object_fetcher.h.

Member Typedef Documentation

template<class CatalogT = catalog::Catalog, class HistoryT = history::SqliteHistory, class ReflogT = manifest::Reflog>
typedef AbstractObjectFetcher<ThisTN> LocalObjectFetcher< CatalogT, HistoryT, ReflogT >::BaseTN
protected

Definition at line 334 of file object_fetcher.h.

template<class CatalogT = catalog::Catalog, class HistoryT = history::SqliteHistory, class ReflogT = manifest::Reflog>
typedef BaseTN::Failures LocalObjectFetcher< CatalogT, HistoryT, ReflogT >::Failures

Definition at line 337 of file object_fetcher.h.

template<class CatalogT = catalog::Catalog, class HistoryT = history::SqliteHistory, class ReflogT = manifest::Reflog>
typedef LocalObjectFetcher<CatalogT, HistoryT, ReflogT> LocalObjectFetcher< CatalogT, HistoryT, ReflogT >::ThisTN
protected

Definition at line 333 of file object_fetcher.h.

Constructor & Destructor Documentation

template<class CatalogT = catalog::Catalog, class HistoryT = history::SqliteHistory, class ReflogT = manifest::Reflog>
LocalObjectFetcher< CatalogT, HistoryT, ReflogT >::LocalObjectFetcher ( const std::string &  base_path,
const std::string &  temp_dir 
)
inline

LocalObjectFetcher can reside on the stack or the heap.

Parameters
base_paththe path to the repository's backend storage
temp_dirlocation to store decompressed tmp data

Definition at line 346 of file object_fetcher.h.

Member Function Documentation

template<class CatalogT = catalog::Catalog, class HistoryT = history::SqliteHistory, class ReflogT = manifest::Reflog>
std::string LocalObjectFetcher< CatalogT, HistoryT, ReflogT >::BuildPath ( const std::string &  relative_path) const
inlineprotected
template<class CatalogT = catalog::Catalog, class HistoryT = history::SqliteHistory, class ReflogT = manifest::Reflog>
std::string LocalObjectFetcher< CatalogT, HistoryT, ReflogT >::BuildRelativePath ( const shash::Any hash) const
inlineprotected

Definition at line 428 of file object_fetcher.h.

Referenced by LocalObjectFetcher< CatalogT, HistoryT, ReflogT >::Fetch(), and LocalObjectFetcher< CatalogT, HistoryT, ReflogT >::GetUrl().

Here is the call graph for this function:

Here is the caller graph for this function:

template<class CatalogT = catalog::Catalog, class HistoryT = history::SqliteHistory, class ReflogT = manifest::Reflog>
Failures LocalObjectFetcher< CatalogT, HistoryT, ReflogT >::Fetch ( const shash::Any object_hash,
std::string *  file_path 
)
inline

Definition at line 367 of file object_fetcher.h.

Here is the call graph for this function:

template<class CatalogT = catalog::Catalog, class HistoryT = history::SqliteHistory, class ReflogT = manifest::Reflog>
Failures LocalObjectFetcher< CatalogT, HistoryT, ReflogT >::Fetch ( const std::string &  relative_path,
const bool  decompress,
const bool  ,
std::string *  file_path 
)
inline

Definition at line 378 of file object_fetcher.h.

Here is the call graph for this function:

template<class CatalogT = catalog::Catalog, class HistoryT = history::SqliteHistory, class ReflogT = manifest::Reflog>
Failures LocalObjectFetcher< CatalogT, HistoryT, ReflogT >::FetchManifest ( manifest::Manifest **  manifest)
inline

Definition at line 352 of file object_fetcher.h.

Here is the call graph for this function:

template<class CatalogT = catalog::Catalog, class HistoryT = history::SqliteHistory, class ReflogT = manifest::Reflog>
std::string LocalObjectFetcher< CatalogT, HistoryT, ReflogT >::GetUrl ( const shash::Any hash) const
inline

Definition at line 363 of file object_fetcher.h.

Here is the call graph for this function:

Member Data Documentation

template<class CatalogT = catalog::Catalog, class HistoryT = history::SqliteHistory, class ReflogT = manifest::Reflog>
const std::string LocalObjectFetcher< CatalogT, HistoryT, ReflogT >::base_path_
private

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