9#ifndef SQUID_SRC_STORE_CONTROLLER_H
10#define SQUID_SRC_STORE_CONTROLLER_H
30 uint64_t
maxSize()
const override;
31 uint64_t
minSize()
const override;
High-level store statistics used by mgr:info action. Used inside PODs!
void memoryOut(StoreEntry &, const bool preserveSwappable)
called to get rid of no longer needed entry data in RAM, if any
void checkFoundCandidate(const StoreEntry &) const
flags problematic entries before find() commits to finalizing/returning them
void configure()
update configuration, including limits (re)calculation
~Controller() override
this destructor is never called because Controller singleton is immortal
StoreEntry * findCallbackXXX(const cache_key *)
bool markedForDeletionAndAbandoned(const StoreEntry &) const
StoreEntry * peekAtLocal(const cache_key *)
void checkTransients(const StoreEntry &) const
int transientReaders(const StoreEntry &) const
number of the transient entry readers some time ago
void noteStoppedSharedWriting(StoreEntry &)
adjust shared state after this worker stopped changing the entry
void addReading(StoreEntry *, const cache_key *)
void addWriting(StoreEntry *, const cache_key *)
uint64_t maxSize() const override
void handleIdleEntry(StoreEntry &)
called when the entry is no longer needed by any transaction
bool allowCollapsing(StoreEntry *, const RequestFlags &, const HttpRequestMethod &)
tries to make the entry available for collapsing future requests
void sync() override
prepare for shutdown
void stat(StoreEntry &) const override
bool transientsReader(const StoreEntry &) const
whether the entry is in "reading from Transients" I/O state
void referenceBusy(StoreEntry &e)
update reference counters of the recently touched entry
void freeMemorySpace(const int spaceRequired)
void maintain() override
perform regular periodic maintenance; TODO: move to UFSSwapDir::Maintain
void syncCollapsed(const sfileno)
Update local intransit entry after changes made by appending worker.
void getStats(StoreInfoStats &stats) const override
collect statistics
uint64_t minSize() const override
the minimum size the store will shrink to via normal housekeeping
void memoryDisconnect(StoreEntry &)
disassociates the entry from the memory cache, preserving cached data
bool hasReadableDiskEntry(const StoreEntry &) const
whether there is a disk entry with e.key
bool markedForDeletion(const cache_key *key) const
bool updateOnNotModified(StoreEntry *old, StoreEntry &e304)
void transientsDisconnect(StoreEntry &)
disassociates the entry from the intransit table
int64_t accumulateMore(StoreEntry &) const
bool memoryCacheHasSpaceFor(const int pagesRequired) const
whether the memory cache is allowed to store that many additional pages
static int store_dirs_rebuilding
the number of cache_dirs being rebuilt; TODO: move to Disks::Rebuilding
int memoryPagesDebt_
Hack: Relays page shortage from freeMemorySpace() to handleIdleEntry().
int64_t maxObjectSize() const override
the maximum size of a storable object; -1 if unlimited
bool anchorToCache(StoreEntry &)
void memoryEvictCached(StoreEntry &)
Memory * sharedMemStore
memory cache that multiple workers can use
static bool SmpAware()
whether there are any SMP-aware storages
bool transientsWriter(const StoreEntry &) const
whether the entry is in "writing to Transients" I/O state
void create() override
create system resources needed for this store to operate in the future
uint64_t currentSize() const override
current size
bool dereferenceIdle(StoreEntry &, bool wantsLocalMemory)
void evictCached(StoreEntry &) override
void allowSharing(StoreEntry &, const cache_key *)
indexes and adds SMP-tracking for an ephemeral peek() result
bool localMemStore
whether local (non-shared) memory cache is enabled
void transientsUnlinkByKeyIfFound(const cache_key *)
void evictIfFound(const cache_key *) override
StoreEntry * find(const cache_key *)
uint64_t currentCount() const override
the total number of objects stored right now
int callback() override
called once every main loop iteration; TODO: Move to UFS code.
bool keepForLocalMemoryCache(StoreEntry &e) const
whether e should be kept in local RAM for possible future caching
Disks * disks
summary view of all disk caches (including none); never nil
StoreEntry * peek(const cache_key *)
summary view of all disk caches (cache_dirs) combined
Controller & Root()
safely access controller singleton
unsigned char cache_key
Store key.