9#ifndef SQUID_SRC_STORE_DISK_H
10#define SQUID_SRC_STORE_DISK_H
27 explicit Disk(
char const *aType);
30 char const *
type()
const;
33 virtual bool active()
const;
49 uint64_t
minSize()
const override;
120 virtual bool canStore(
const StoreEntry &e, int64_t diskSpaceNeeded,
int &load)
const = 0;
void STIOCB(void *their_data, int errflag, StoreIOState::Pointer self)
High-level store statistics used by mgr:info action. Used inside PODs!
virtual void write(StoreEntry const &)=0
virtual const StoreEntry * nextEntry()=0
manages a single cache_dir
virtual bool canStore(const StoreEntry &e, int64_t diskSpaceNeeded, int &load) const =0
check whether we can store the entry; if we can, report current load
bool canLog(StoreEntry const &e) const
virtual bool active() const
void create() override
create system resources needed for this store to operate in the future
virtual void parse(int index, char *path)=0
virtual bool doReportStat() const
whether stat should be reported by this SwapDir
virtual bool doubleCheck(StoreEntry &)
virtual void finalizeSwapoutSuccess(const StoreEntry &)=0
finalize the successful swapout that has been already noticed by Store
virtual bool needsDiskStrand() const
needs a dedicated kid process
void parseOptions(int reconfiguring)
bool objectSizeIsAcceptable(int64_t objSize) const
virtual void writeCleanDone()
int64_t minObjectSize() const
the size of the smallest entry this cache_dir can store
virtual bool allowOptionReconfigure(const char *const) const
struct Store::Disk::Flags flags
char const * type() const
virtual bool smpAware() const =0
whether this disk storage is capable of serving multiple workers
virtual int writeCleanStart()
void dumpOptions(StoreEntry *e) const
virtual void statfs(StoreEntry &) const
void optionReadOnlyDump(StoreEntry *e) const
uint64_t minSize() const override
the minimum size the store will shrink to via normal housekeeping
virtual void logEntry(const StoreEntry &e, int op) const
int64_t sizeInBlocks(const int64_t size) const
virtual void reconfigure()=0
int disker
disker kid id dedicated to this SwapDir or -1
int64_t max_objsize
maximum size of any object stored here (-1 for no limit)
bool optionObjectSizeParse(char const *option, const char *value, int reconfiguring)
virtual void disconnect(StoreEntry &)
called when the entry is about to forget its association with cache_dir
virtual StoreIOState::Pointer createStoreIO(StoreEntry &, StoreIOState::STIOCB *, void *)=0
virtual bool unlinkdUseful() const =0
whether SwapDir may benefit from unlinkd
int64_t maxObjectSize() const override
the maximum size of a storable object; -1 if unlimited
void stat(StoreEntry &) const override
StoreEntry * get(const cache_key *) override
int64_t min_objsize
minimum size of any object stored here (-1 for no limit)
virtual bool hasReadableEntry(const StoreEntry &e) const =0
whether this cache dir has an entry with e.key
virtual void dump(StoreEntry &) const
virtual ConfigOption * getOptionTree() const
void reference(StoreEntry &e) override
somebody needs this entry (many cache replacement policies need to know)
bool dereference(StoreEntry &e) override
void getStats(StoreInfoStats &stats) const override
collect statistics
uint64_t maxSize() const override
uint64_t max_size
maximum allocatable size of the storage area
struct Store::Disk::@118 fs
void optionObjectSizeDump(StoreEntry *e) const
bool optionReadOnlyParse(char const *option, const char *value, int reconfiguring)
virtual void finalizeSwapoutFailure(StoreEntry &)=0
abort the failed swapout that has been already noticed by Store
void maintain() override
perform regular periodic maintenance; TODO: move to UFSSwapDir::Maintain
virtual StoreIOState::Pointer openStoreIO(StoreEntry &, StoreIOState::STIOCB *, void *)=0
unsigned char cache_key
Store key.