#include <cache_extern.h>
|
virtual | ~ExternalCacheManager () |
|
virtual CacheManagerIds | id () |
|
virtual std::string | Describe () |
|
virtual bool | AcquireQuotaManager (QuotaManager *quota_mgr) |
|
virtual int | Open (const LabeledObject &object) |
|
virtual int64_t | GetSize (int fd) |
|
virtual int | Close (int fd) |
|
virtual int64_t | Pread (int fd, void *buf, uint64_t size, uint64_t offset) |
|
virtual int | Dup (int fd) |
|
virtual int | Readahead (int fd) |
|
virtual uint32_t | SizeOfTxn () |
|
virtual int | StartTxn (const shash::Any &id, uint64_t size, void *txn) |
|
virtual void | CtrlTxn (const Label &label, const int flags, void *txn) |
|
virtual int64_t | Write (const void *buf, uint64_t size, void *txn) |
|
virtual int | Reset (void *txn) |
|
virtual int | AbortTxn (void *txn) |
|
virtual int | OpenFromTxn (void *txn) |
|
virtual int | CommitTxn (void *txn) |
|
virtual manifest::Breadcrumb | LoadBreadcrumb (const std::string &fqrn) |
|
virtual bool | StoreBreadcrumb (const manifest::Manifest &manifest) |
|
virtual void | Spawn () |
|
int64_t | session_id () const |
|
uint32_t | max_object_size () const |
|
uint64_t | capabilities () const |
|
pid_t | pid_plugin () const |
|
virtual | ~CacheManager () |
|
int | ChecksumFd (int fd, shash::Any *id) |
|
int | OpenPinned (const LabeledObject &object) |
|
bool | Open2Mem (const LabeledObject &object, unsigned char **buffer, uint64_t *size) |
|
bool | CommitFromMem (const LabeledObject &object, const unsigned char *buffer, const uint64_t size) |
|
QuotaManager * | quota_mgr () |
|
void * | SaveState (const int fd_progress) |
|
int | RestoreState (const int fd_progress, void *state) |
|
void | FreeState (const int fd_progress, void *state) |
|
CacheManagerIds | PeekState (void *state) |
|
|
static void * | MainRead (void *data) |
|
static int | ConnectLocator (const std::string &locator, bool print_error) |
|
static bool | SpawnPlugin (const std::vector< std::string > &cmd_line) |
|
Definition at line 30 of file cache_extern.h.
ExternalCacheManager::~ExternalCacheManager |
( |
| ) |
|
|
virtual |
ExternalCacheManager::ExternalCacheManager |
( |
int |
fd_connection, |
|
|
unsigned |
max_open_fds |
|
) |
| |
|
explicitprivate |
int ExternalCacheManager::AbortTxn |
( |
void * |
txn | ) |
|
|
virtual |
bool ExternalCacheManager::AcquireQuotaManager |
( |
QuotaManager * |
quota_mgr | ) |
|
|
virtual |
uint64_t ExternalCacheManager::capabilities |
( |
| ) |
const |
|
inline |
int ExternalCacheManager::ChangeRefcount |
( |
const shash::Any & |
id, |
|
|
int |
change_by |
|
) |
| |
|
private |
int ExternalCacheManager::Close |
( |
int |
fd | ) |
|
|
virtual |
int ExternalCacheManager::CommitTxn |
( |
void * |
txn | ) |
|
|
virtual |
int ExternalCacheManager::ConnectLocator |
( |
const std::string & |
locator, |
|
|
bool |
print_error |
|
) |
| |
|
staticprivate |
ExternalCacheManager * ExternalCacheManager::Create |
( |
int |
fd_connection, |
|
|
unsigned |
max_open_fds, |
|
|
const std::string & |
ident |
|
) |
| |
|
static |
Tries to connect to the plugin at locator, or, if it doesn't exist, spawns a new plugin using cmdline. Two processes could try to spawn the plugin at the same time. In this case, the plugin should indicate to the client to retry connecting.
Definition at line 261 of file cache_extern.cc.
Referenced by FileSystem::SetupExternalCacheMgr().
void ExternalCacheManager::CtrlTxn |
( |
const Label & |
label, |
|
|
const int |
flags, |
|
|
void * |
txn |
|
) |
| |
|
virtual |
string ExternalCacheManager::Describe |
( |
| ) |
|
|
virtual |
Return a human readable description of the cache instance. Used in cvmfs_talk.
Implements CacheManager.
Definition at line 309 of file cache_extern.cc.
bool ExternalCacheManager::DoFreeState |
( |
void * |
data | ) |
|
|
protectedvirtual |
int ExternalCacheManager::DoOpen |
( |
const shash::Any & |
id | ) |
|
|
private |
int ExternalCacheManager::DoRestoreState |
( |
void * |
data | ) |
|
|
protectedvirtual |
void * ExternalCacheManager::DoSaveState |
( |
| ) |
|
|
protectedvirtual |
int ExternalCacheManager::Dup |
( |
int |
fd | ) |
|
|
virtual |
int ExternalCacheManager::Flush |
( |
bool |
do_commit, |
|
|
Transaction * |
transaction |
|
) |
| |
|
private |
ExternalCacheManager::FRIEND_TEST |
( |
T_ExternalCacheManager |
, |
|
|
TransactionAbort |
|
|
) |
| |
|
private |
shash::Any ExternalCacheManager::GetHandle |
( |
int |
fd | ) |
|
|
private |
int64_t ExternalCacheManager::GetSize |
( |
int |
fd | ) |
|
|
virtual |
While not strictly necessary, cache managers often have a directory associated with them. This directory is currently used to find the cached manifest copy, the cvmfschecksum.$reponame file. This is important to make pre-loaded alien caches work, even in a tiered setup.
Reimplemented from CacheManager.
Definition at line 681 of file cache_extern.cc.
void * ExternalCacheManager::MainRead |
( |
void * |
data | ) |
|
|
staticprivate |
uint32_t ExternalCacheManager::max_object_size |
( |
| ) |
const |
|
inline |
int64_t ExternalCacheManager::NextRequestId |
( |
| ) |
|
|
inlineprivate |
Opening an object might get it from a third-party source, e.g. when the tiered cache manager issues a copy-up operation. In this case it is beneficial to register the object with the accurate meta-data, in the same way it is done during transactions.
Implements CacheManager.
Definition at line 575 of file cache_extern.cc.
int ExternalCacheManager::OpenFromTxn |
( |
void * |
txn | ) |
|
|
virtual |
pid_t ExternalCacheManager::pid_plugin |
( |
| ) |
const |
|
inline |
int64_t ExternalCacheManager::Pread |
( |
int |
fd, |
|
|
void * |
buf, |
|
|
uint64_t |
size, |
|
|
uint64_t |
offset |
|
) |
| |
|
virtual |
int ExternalCacheManager::Readahead |
( |
int |
fd | ) |
|
|
virtual |
int ExternalCacheManager::Reset |
( |
void * |
txn | ) |
|
|
virtual |
int64_t ExternalCacheManager::session_id |
( |
| ) |
const |
|
inline |
virtual uint32_t ExternalCacheManager::SizeOfTxn |
( |
| ) |
|
|
inlinevirtual |
void ExternalCacheManager::Spawn |
( |
| ) |
|
|
virtual |
bool ExternalCacheManager::SpawnPlugin |
( |
const std::vector< std::string > & |
cmd_line | ) |
|
|
staticprivate |
Returns true if the plugin could be spawned or was spawned by another process.
Definition at line 750 of file cache_extern.cc.
int ExternalCacheManager::StartTxn |
( |
const shash::Any & |
id, |
|
|
uint64_t |
size, |
|
|
void * |
txn |
|
) |
| |
|
virtual |
int64_t ExternalCacheManager::Write |
( |
const void * |
buf, |
|
|
uint64_t |
size, |
|
|
void * |
txn |
|
) |
| |
|
virtual |
uint64_t ExternalCacheManager::capabilities_ |
|
private |
std::vector<RpcInFlight> ExternalCacheManager::inflight_rpcs_ |
|
private |
const shash::Any ExternalCacheManager::kInvalidHandle |
|
staticprivate |
const unsigned ExternalCacheManager::kMaxSupportedObjectSize = 512 * 1024 |
|
staticprivate |
Objects cannot be larger than 512 kB. Keeps transaction memory consumption under control.
Definition at line 118 of file cache_extern.h.
const unsigned ExternalCacheManager::kMinSupportedObjectSize = 4 * 1024 |
|
staticprivate |
Statistically, at least half of our objects should not be further chunked.
Definition at line 122 of file cache_extern.h.
const unsigned ExternalCacheManager::kPbProtocolVersion = 1 |
|
static |
pthread_mutex_t ExternalCacheManager::lock_inflight_rpcs_ |
|
private |
pthread_mutex_t ExternalCacheManager::lock_send_fd_ |
|
private |
uint32_t ExternalCacheManager::max_object_size_ |
|
private |
pid_t ExternalCacheManager::pid_plugin_ |
|
private |
pthread_rwlock_t ExternalCacheManager::rwlock_fd_table_ |
|
private |
int64_t ExternalCacheManager::session_id_ |
|
private |
Definition at line 291 of file cache_extern.h.
Referenced by ExternalQuotaManager::Cleanup(), Create(), ExternalQuotaManager::DoListing(), Flush(), ExternalQuotaManager::GetInfo(), GetSize(), LoadBreadcrumb(), Pread(), Reset(), session_id(), StoreBreadcrumb(), and ~ExternalCacheManager().
bool ExternalCacheManager::spawned_ |
|
private |
bool ExternalCacheManager::terminated_ |
|
private |
pthread_t ExternalCacheManager::thread_read_ |
|
private |
The documentation for this class was generated from the following files:
- /home/sftnight/jenkins/workspace/CvmfsDoxygen/label/docker-x86_64/cvmfs/cvmfs/cache_extern.h
- /home/sftnight/jenkins/workspace/CvmfsDoxygen/label/docker-x86_64/cvmfs/cvmfs/cache_extern.cc