4 #ifndef CVMFS_CACHE_RAM_H_
5 #define CVMFS_CACHE_RAM_H_
67 "Number of GetSize calls");
69 "Number of Close calls");
71 "Number of Pread calls");
73 "Number of Dup calls");
75 "Number of ReadAhead calls");
77 "Number of StartTxn calls");
79 "Number of Write calls");
81 "Number of Reset calls");
83 "Number of AbortTxn calls");
85 "Number of Commit calls");
87 "Number of times the limit on handles was reached");
89 "Number of opens from the regular cache");
91 "Number of opens from the volatile cache");
93 "Number of missed opens");
95 "Number of reallocs");
97 "Number of cache limit overruns");
99 "Number of overruns that could not be resolved");
108 unsigned max_entries,
125 virtual int Open(
const LabeledObject &
object);
133 virtual int64_t
GetSize(
int fd);
141 virtual int Close(
int fd);
150 virtual int64_t
Pread(
int fd,
void *buf, uint64_t
size, uint64_t offset);
160 virtual int Dup(
int fd);
193 virtual void CtrlTxn(
const Label &label,
const int flags,
void *txn);
202 virtual int64_t
Write(
const void *buf, uint64_t
size,
void *txn);
208 virtual int Reset(
void *txn);
292 int AddFd(
const ReadOnlyHandle &handle);
304 #endif // CVMFS_CACHE_RAM_H_
perf::Counter * n_aborttxn
perf::Counter * n_openmiss
virtual CacheManagerIds id()
RamCacheManager(uint64_t max_size, unsigned max_entries, MemoryKvStore::MemoryAllocator alloc, perf::StatisticsTemplate statistics)
perf::Counter * n_getsize
virtual int OpenFromTxn(void *txn)
virtual int Open(const LabeledObject &object)
static const shash::Any kInvalidHandle
bool operator==(const ReadOnlyHandle &other) const
virtual int Close(int fd)
perf::Counter * n_committxn
virtual int CommitTxn(void *txn)
MemoryKvStore * GetStore(const ReadOnlyHandle &fd)
Counters(perf::StatisticsTemplate statistics)
virtual int AbortTxn(void *txn)
perf::Counter * n_starttxn
MemoryKvStore * GetTransactionStore(Transaction *txn)
Counter * RegisterTemplated(const std::string &name_minor, const std::string &desc)
virtual void CtrlTxn(const Label &label, const int flags, void *txn)
virtual int StartTxn(const shash::Any &id, uint64_t size, void *txn)
virtual int64_t Pread(int fd, void *buf, uint64_t size, uint64_t offset)
virtual int Readahead(int fd)
FdTable< ReadOnlyHandle > fd_table_
perf::Counter * n_readahead
perf::Counter * n_overrun
perf::Counter * n_realloc
int AddFd(const ReadOnlyHandle &handle)
int64_t CommitToKvStore(Transaction *transaction)
perf::Counter * n_openregular
bool operator!=(const ReadOnlyHandle &other) const
ReadOnlyHandle(const shash::Any &h, bool v)
virtual int DoOpen(const shash::Any &id)
static const int kLabelVolatile
perf::Counter * n_openvolatile
virtual std::string Describe()
QuotaManager * quota_mgr()
virtual int64_t GetSize(int fd)
virtual int Reset(void *txn)
virtual ~RamCacheManager()
MemoryKvStore regular_entries_
MemoryKvStore volatile_entries_
virtual int64_t Write(const void *buf, uint64_t size, void *txn)
virtual bool AcquireQuotaManager(QuotaManager *quota_mgr)
virtual uint32_t SizeOfTxn()