Store::Controlled Class Referenceabstract

#include <Controlled.h>

Inheritance diagram for Store::Controlled:
Collaboration diagram for Store::Controlled:

Public Member Functions

virtual void reference (StoreEntry &e)=0
 somebody needs this entry (many cache replacement policies need to know) More...
 
virtual bool dereference (StoreEntry &e)=0
 
virtual void updateHeaders (StoreEntry *)
 make stored metadata and HTTP headers the same as in the given entry More...
 
virtual bool anchorCollapsed (StoreEntry &, bool &)
 
virtual bool updateCollapsed (StoreEntry &)
 
virtual void create ()=0
 create system resources needed for this store to operate in the future More...
 
virtual void init ()=0
 
virtual StoreEntryget (const cache_key *)=0
 Retrieve a store entry from the store (blocking) More...
 
virtual uint64_t maxSize () const =0
 
virtual uint64_t minSize () const =0
 the minimum size the store will shrink to via normal housekeeping More...
 
virtual uint64_t currentSize () const =0
 current size More...
 
virtual uint64_t currentCount () const =0
 the total number of objects stored right now More...
 
virtual int64_t maxObjectSize () const =0
 the maximum size of a storable object; -1 if unlimited More...
 
virtual void getStats (StoreInfoStats &stats) const =0
 collect statistics More...
 
virtual void stat (StoreEntry &e) const =0
 
virtual void markForUnlink (StoreEntry &e)=0
 expect an unlink() call after the entry becomes idle More...
 
virtual void unlink (StoreEntry &e)=0
 remove the entry from the store More...
 
virtual int callback ()
 called once every main loop iteration; TODO: Move to UFS code. More...
 
virtual void maintain ()=0
 perform regular periodic maintenance; TODO: move to UFSSwapDir::Maintain More...
 
virtual void sync ()
 prepare for shutdown More...
 
virtual bool smpAware () const =0
 

Detailed Description

Storage controlled by a Controller. This API is shared among Disks, Disk, Memory caches and Transients.

Definition at line 18 of file Controlled.h.

Member Function Documentation

virtual bool Store::Controlled::anchorCollapsed ( StoreEntry ,
bool &   
)
inlinevirtual

If this storage cannot cache collapsed entries, return false. If the entry is not found, return false. Otherwise, return true after tying the entry to this cache and setting inSync to updateCollapsed().

Reimplemented in Rock::SwapDir, MemStore, and Store::Disks.

Definition at line 34 of file Controlled.h.

Referenced by Store::Disks::anchorCollapsed().

virtual int Store::Storage::callback ( )
inlinevirtualinherited

Reimplemented in Fs::Ufs::UFSSwapDir, TestStore, Store::Controller, and Store::Disks.

Definition at line 70 of file Storage.h.

virtual void Store::Storage::create ( )
pure virtualinherited
virtual uint64_t Store::Storage::currentCount ( ) const
pure virtualinherited
virtual uint64_t Store::Storage::currentSize ( ) const
pure virtualinherited
virtual bool Store::Controlled::dereference ( StoreEntry e)
pure virtual

somebody no longer needs this entry (usually after calling reference()) return false iff the idle entry should be destroyed

Implemented in Rock::SwapDir, Transients, MemStore, Fs::Ufs::UFSSwapDir, Store::Disk, and Store::Disks.

virtual StoreEntry* Store::Storage::get ( const cache_key )
pure virtualinherited
virtual void Store::Storage::getStats ( StoreInfoStats stats) const
pure virtualinherited
virtual void Store::Storage::init ( )
pure virtualinherited

Start preparing the store for use. To check readiness, callers should use readable() and writable() methods.

Implemented in Rock::SwapDir, Transients, TestStore, MemStore, Fs::Ufs::UFSSwapDir, Store::Controller, TestSwapDir, and Store::Disks.

virtual void Store::Storage::maintain ( )
pure virtualinherited
virtual void Store::Storage::markForUnlink ( StoreEntry e)
pure virtualinherited
virtual int64_t Store::Storage::maxObjectSize ( ) const
pure virtualinherited
virtual uint64_t Store::Storage::maxSize ( ) const
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 Transients, TestStore, MemStore, Store::Disk, Store::Controller, Store::Disks, and TestSwapDir.

virtual uint64_t Store::Storage::minSize ( ) const
pure virtualinherited
virtual void Store::Controlled::reference ( StoreEntry e)
pure virtual
virtual bool Store::Storage::smpAware ( ) const
pure virtualinherited

whether this storage is capable of serving multiple workers; a true result does not imply [lack of] non-SMP support because [only] some SMP-aware storages also support non-SMP configss

Implemented in Transients, Fs::Ufs::UFSSwapDir, MemStore, Store::Disk, Store::Disks, Rock::SwapDir, and Store::Controller.

virtual void Store::Storage::stat ( StoreEntry e) const
pure virtualinherited

Output stats to the provided store entry.

Todo:
make these calls asynchronous

Implemented in TestStore, Transients, MemStore, Store::Disk, Store::Controller, Store::Disks, and TestSwapDir.

virtual void Store::Storage::sync ( void  )
inlinevirtualinherited

Reimplemented in Fs::Ufs::UFSSwapDir, Store::Controller, and Store::Disks.

Definition at line 76 of file Storage.h.

virtual void Store::Storage::unlink ( StoreEntry e)
pure virtualinherited
virtual bool Store::Controlled::updateCollapsed ( StoreEntry )
inlinevirtual

Update a local collapsed entry with fresh info from this cache (if any). Return true iff the cache supports collapsed entries and the given local collapsed entry is now in sync with this storage.

Reimplemented in Rock::SwapDir, MemStore, and Store::Disks.

Definition at line 39 of file Controlled.h.

virtual void Store::Controlled::updateHeaders ( StoreEntry )
inlinevirtual

Reimplemented in Rock::SwapDir, MemStore, and Store::Disks.

Definition at line 29 of file Controlled.h.

Referenced by Store::Disks::updateHeaders().


The documentation for this class was generated from the following file:

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors