5 #ifndef CVMFS_CACHE_POSIX_H_
6 #define CVMFS_CACHE_POSIX_H_
21 #include "gtest/gtest_prod.h"
41 FRIEND_TEST(T_CacheManager, CommitTxnQuotaNotifications);
80 virtual int Open(
const LabeledObject &
object);
81 virtual int64_t
GetSize(
int fd);
82 virtual int Close(
int fd);
83 virtual int64_t
Pread(
int fd,
void *buf, uint64_t
size, uint64_t offset);
84 virtual int Dup(
int fd);
89 virtual void CtrlTxn(
const Label &label,
92 virtual int64_t
Write(
const void *buf, uint64_t
size,
void *txn);
93 virtual int Reset(
void *txn);
127 , final_path(final_path)
158 int Rename(
const char *oldpath,
const char *newpath);
202 #endif // CVMFS_CACHE_POSIX_H_
RenameWorkarounds rename_workaround_
virtual int64_t Write(const void *buf, uint64_t size, void *txn)
const manifest::Manifest * manifest() const
virtual int Open(const LabeledObject &object)
int Flush(Transaction *transaction)
static const char kMagicNoRefcount
virtual int CommitTxn(void *txn)
int OpenPinned(const LabeledObject &object)
virtual int AbortTxn(void *txn)
virtual void * DoSaveState()
virtual int64_t GetSize(int fd)
virtual bool AcquireQuotaManager(QuotaManager *quota_mgr)
virtual void CtrlTxn(const Label &label, const int flags, void *txn)
PosixCacheManager(const std::string &cache_path, const bool alien_cache, const bool do_refcount=true)
int Rename(const char *oldpath, const char *newpath)
std::string GetPathInCache(const shash::Any &id)
bool InitCacheDirectory(const string &cache_path)
virtual int OpenFromTxn(void *txn)
virtual int Readahead(int fd)
std::string txn_template_path_
unsigned char buffer[4096]
static PosixCacheManager * Create(const std::string &cache_path, const bool alien_cache, const RenameWorkarounds rename_workaround=kRenameNormal, const bool do_refcount=true)
static const uint64_t kBigFile
virtual int StartTxn(const shash::Any &id, uint64_t size, void *txn)
virtual manifest::Breadcrumb LoadBreadcrumb(const std::string &fqrn)
bool reports_correct_filesize_
static const char kMagicRefcount
virtual CacheManagerIds id()
FRIEND_TEST(T_CacheManager, CommitTxnQuotaNotifications)
UniquePtr< FdRefcountMgr > fd_mgr_
virtual int Reset(void *txn)
QuotaManager * quota_mgr()
Transaction(const shash::Any &id, const std::string &final_path)
virtual bool DoFreeState(void *data)
virtual int DoRestoreState(void *data)
virtual std::string Describe()
virtual bool StoreBreadcrumb(const manifest::Manifest &manifest)
atomic_int32 no_inflight_txns_
virtual ~PosixCacheManager()
virtual int Close(int fd)
virtual int64_t Pread(int fd, void *buf, uint64_t size, uint64_t offset)
static const uint64_t kSizeUnknown
virtual uint32_t SizeOfTxn()
UniquePtr< FdRefcountMgr > fd_mgr