Store::Storage Class Referenceabstract

#include <Storage.h>

Inheritance diagram for Store::Storage:
Collaboration diagram for Store::Storage:

Public Member Functions

virtual ~Storage ()
 
virtual void create ()=0
 create system resources needed for this store to operate in the future More...
 
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 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 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. 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

A "response storage" abstraction. This API is shared among Controller and Controlled classes.

Definition at line 23 of file Storage.h.

Constructor & Destructor Documentation

virtual Store::Storage::~Storage ( )
inlinevirtual

Definition at line 26 of file Storage.h.

Member Function Documentation

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

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

Definition at line 72 of file Storage.h.

virtual void Store::Storage::create ( )
pure virtual
virtual uint64_t Store::Storage::currentCount ( ) const
pure virtual
virtual uint64_t Store::Storage::currentSize ( ) const
pure virtual
virtual void Store::Storage::evictCached ( StoreEntry e)
pure virtual

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 Transients, MemStore, Fs::Ufs::UFSSwapDir, Rock::SwapDir, Store::Disks, Store::Controller, and TestSwapDir.

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

virtual void Store::Storage::evictIfFound ( const cache_key )
pure virtual

An evictCached() equivalent for callers that did not get() a StoreEntry. Callers with StoreEntry objects must use evictCached() instead.

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

virtual void Store::Storage::getStats ( StoreInfoStats stats) const
pure virtual
virtual void Store::Storage::init ( )
pure virtual

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 virtual
virtual int64_t Store::Storage::maxObjectSize ( ) const
pure virtual
virtual uint64_t Store::Storage::maxSize ( ) const
pure virtual

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 TestStore, Transients, MemStore, Store::Disk, Store::Controller, Store::Disks, and TestSwapDir.

virtual uint64_t Store::Storage::minSize ( ) const
pure virtual
virtual bool Store::Storage::smpAware ( ) const
pure virtual

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 Fs::Ufs::UFSSwapDir, Transients, MemStore, Store::Disk, Rock::SwapDir, Store::Disks, and Store::Controller.

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

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  )
inlinevirtual

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

Definition at line 78 of file Storage.h.


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

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors