|
Squid Web Cache master
|
#include <Controlled.h>
Public Member Functions | |
| virtual StoreEntry * | get (const cache_key *)=0 |
| virtual void | reference (StoreEntry &e)=0 |
| somebody needs this entry (many cache replacement policies need to know) | |
| virtual bool | dereference (StoreEntry &e)=0 |
| virtual void | updateHeaders (StoreEntry *) |
| make stored metadata and HTTP headers the same as in the given entry | |
| virtual bool | anchorToCache (StoreEntry &) |
| virtual bool | updateAnchored (StoreEntry &) |
| virtual void | create ()=0 |
| create system resources needed for this store to operate in the future | |
| virtual void | init ()=0 |
| virtual uint64_t | maxSize () const =0 |
| virtual uint64_t | minSize () const =0 |
| the minimum size the store will shrink to via normal housekeeping | |
| virtual uint64_t | currentSize () const =0 |
| current size | |
| virtual uint64_t | currentCount () const =0 |
| the total number of objects stored right now | |
| virtual int64_t | maxObjectSize () const =0 |
| the maximum size of a storable object; -1 if unlimited | |
| virtual void | getStats (StoreInfoStats &stats) const =0 |
| collect statistics | |
| virtual void | stat (StoreEntry &e) const =0 |
| virtual void | evictCached (StoreEntry &e)=0 |
| virtual void | evictIfFound (const cache_key *)=0 |
| virtual int | callback () |
| called once every main loop iteration; TODO: Move to UFS code. | |
| virtual void | maintain ()=0 |
| perform regular periodic maintenance; TODO: move to UFSSwapDir::Maintain | |
| virtual void | sync () |
| prepare for shutdown | |
Storage controlled by a Controller. This API is shared among Disks, Disk, Memory caches and Transients.
Definition at line 18 of file Controlled.h.
|
inlinevirtual |
tie StoreEntry to this storage if this storage has a matching entry
| true | if this storage has a matching entry |
Reimplemented in Rock::SwapDir, MemStore, and Store::Disks.
Definition at line 39 of file Controlled.h.
Referenced by Store::Disks::anchorToCache().
|
inlinevirtualinherited |
Reimplemented in Fs::Ufs::UFSSwapDir, Store::Controller, and Store::Disks.
|
pure virtualinherited |
Implemented in Rock::SwapDir, Fs::Ufs::UFSSwapDir, MemStore, Store::Controller, Store::Disk, Store::Disks, and Transients.
|
pure virtualinherited |
Implemented in Rock::SwapDir, Fs::Ufs::UFSSwapDir, MemStore, Store::Controller, Store::Disks, TestSwapDir, and Transients.
|
pure virtualinherited |
Implemented in Rock::SwapDir, Fs::Ufs::UFSSwapDir, MemStore, Store::Controller, Store::Disks, TestSwapDir, and Transients.
|
pure virtual |
somebody no longer needs this entry (usually after calling reference()) return false iff the idle entry should be destroyed
Implemented in Fs::Ufs::UFSSwapDir, Rock::SwapDir, MemStore, Store::Disk, Store::Disks, and Transients.
|
pure virtualinherited |
Prevent new get() calls from returning the matching entry. If the matching entry is unused, it may be removed from the store now. The store entry is matched using either e attachment info or e.key.
Implemented in Rock::SwapDir, Fs::Ufs::UFSSwapDir, MemStore, Store::Controller, Store::Disks, TestSwapDir, and Transients.
Referenced by Store::Disks::evictCached().
|
pure virtualinherited |
An evictCached() equivalent for callers that did not get() a StoreEntry. Callers with StoreEntry objects must use evictCached() instead.
Implemented in Rock::SwapDir, Fs::Ufs::UFSSwapDir, MemStore, Store::Controller, Store::Disks, TestSwapDir, and Transients.
|
pure virtual |
Implemented in MemStore, Store::Disk, Store::Disks, Transients, and Rock::SwapDir.
|
pure virtualinherited |
Implemented in MemStore, Store::Controller, Store::Disk, Store::Disks, and Transients.
|
pure virtualinherited |
Start preparing the store for use. To check readiness, callers should use readable() and writable() methods.
Implemented in Rock::SwapDir, Fs::Ufs::UFSSwapDir, MemStore, Store::Controller, Store::Disks, TestSwapDir, and Transients.
|
pure virtualinherited |
Implemented in Rock::SwapDir, Fs::Ufs::UFSSwapDir, MemStore, Store::Controller, Store::Disk, Store::Disks, and Transients.
|
pure virtualinherited |
Implemented in MemStore, Store::Controller, Store::Disk, Store::Disks, and Transients.
|
pure virtualinherited |
The maximum size the store will support in normal use. Inaccuracy is permitted, but may throw estimates for memory etc out of whack.
Implemented in MemStore, Store::Controller, Store::Disk, Store::Disks, TestSwapDir, and Transients.
|
pure virtualinherited |
Implemented in MemStore, Store::Controller, Store::Disk, Store::Disks, and Transients.
|
pure virtual |
Implemented in Fs::Ufs::UFSSwapDir, Store::Disks, Rock::SwapDir, MemStore, Store::Disk, and Transients.
|
pure virtualinherited |
Output stats to the provided store entry. TODO: make these calls asynchronous
Implemented in Store::Controller, Store::Disk, Store::Disks, TestSwapDir, MemStore, and Transients.
|
inlinevirtualinherited |
Reimplemented in Fs::Ufs::UFSSwapDir, Store::Controller, and Store::Disks.
|
inlinevirtual |
Update a local Transients entry with fresh info from this cache (if any). Return true iff the cache supports Transients entries and the given local Transients entry is now in sync with this storage.
Reimplemented in Rock::SwapDir, MemStore, and Store::Disks.
Definition at line 44 of file Controlled.h.
Referenced by Store::Disks::updateAnchored().
|
inlinevirtual |
Reimplemented in Store::Disks, Rock::SwapDir, and MemStore.
Definition at line 35 of file Controlled.h.
Referenced by Store::Disks::updateHeaders().