9#ifndef SQUID_SRC_TRANSIENTS_H
10#define SQUID_SRC_TRANSIENTS_H
64 uint64_t
maxSize()
const override;
65 uint64_t
minSize()
const override;
Ipc::StoreMap TransientsMap
API for adjusting external state when dirty map slice is being freed.
High-level store statistics used by mgr:info action. Used inside PODs!
shared entry metadata, used for synchronization
bool waitingToBeFreed
whether the entry was marked for deletion
bool hasWriter
whether some worker is storing the entry
int readers(const StoreEntry &e) const
number of entry readers some time ago
StoreEntry * get(const cache_key *) override
bool hasWriter(const StoreEntry &)
whether we or somebody else is in the "writing to Transients" I/O state
void monitorIo(StoreEntry *, const cache_key *, const Store::IoStatus)
void addReaderEntry(StoreEntry &, const cache_key *)
void noteFreeMapSlice(const Ipc::StoreMapSliceId sliceId) override
adjust slice-linked state before a locked Readable slice is erased
TransientsMap * map
shared packed info indexed by Store keys, for creating new StoreEntries
void addWriterEntry(StoreEntry &, const cache_key *)
addEntry() helper used for cache entry creators/writers
bool isWriter(const StoreEntry &) const
whether the entry is in "writing to Transients" I/O state
void disconnect(StoreEntry &)
the caller is done writing or reading the given entry
StoreEntry * findCollapsed(const sfileno xitIndex)
return a local, previously collapsed entry
void getStats(StoreInfoStats &stats) const override
collect statistics
int64_t maxObjectSize() const override
the maximum size of a storable object; -1 if unlimited
void stat(StoreEntry &e) const override
void addEntry(StoreEntry *, const cache_key *, const Store::IoStatus)
creates a new Transients entry
bool markedForDeletion(const cache_key *) const
void evictCached(StoreEntry &) override
void status(const StoreEntry &e, EntryStatus &entryStatus) const
copies current shared entry metadata into entryStatus
uint64_t minSize() const override
the minimum size the store will shrink to via normal housekeeping
void reference(StoreEntry &e) override
somebody needs this entry (many cache replacement policies need to know)
void create() override
create system resources needed for this store to operate in the future
uint64_t maxSize() const override
bool dereference(StoreEntry &e) override
void maintain() override
perform regular periodic maintenance; TODO: move to UFSSwapDir::Maintain
static int64_t EntryLimit()
calculates maximum number of entries we need to store and map
bool isReader(const StoreEntry &) const
whether the entry is in "reading from Transients" I/O state
uint64_t currentSize() const override
current size
void completeWriting(const StoreEntry &e)
called when the in-transit entry has been successfully cached
uint64_t currentCount() const override
the total number of objects stored right now
std::vector< StoreEntry * > Locals
void evictIfFound(const cache_key *) override
static bool Enabled()
Can we create and initialize Transients?
IoStatus
cache "I/O" direction and status
unsigned char cache_key
Store key.