allows testing of methods without having all the other components live More...

#include <testStore.h>

Inheritance diagram for TestStore:
Collaboration diagram for TestStore:

Public Member Functions

 TestStore ()
 
virtual int callback ()
 called once every main loop iteration; TODO: Move to UFS code. More...
 
virtual StoreEntryget (const cache_key *)
 Retrieve a store entry from the store (blocking) More...
 
virtual void get (String, void(*)(StoreEntry *, void *), void *)
 
virtual void init ()
 
virtual void maintain ()
 perform regular periodic maintenance; TODO: move to UFSSwapDir::Maintain More...
 
virtual uint64_t maxSize () const
 
virtual uint64_t minSize () const
 the minimum size the store will shrink to via normal housekeeping More...
 
virtual uint64_t currentSize () const
 current size More...
 
virtual uint64_t currentCount () const
 the total number of objects stored right now More...
 
virtual int64_t maxObjectSize () const
 the maximum size of a storable object; -1 if unlimited More...
 
virtual void getStats (StoreInfoStats &) const
 collect statistics More...
 
virtual void stat (StoreEntry &) const
 
virtual void reference (StoreEntry &)
 
virtual bool dereference (StoreEntry &)
 
virtual StoreSearchsearch ()
 
virtual void create () override
 create system resources needed for this store to operate in the future More...
 
virtual void sync () override
 prepare for shutdown More...
 
virtual void markForUnlink (StoreEntry &) override
 expect an unlink() call after the entry becomes idle More...
 
virtual void unlink (StoreEntry &) override
 remove the entry from the store More...
 
virtual bool smpAware () const override
 
int64_t accumulateMore (StoreEntry &) const
 
void updateLimits ()
 slowly calculate (and cache) hi/lo watermarks and similar limits More...
 
void handleIdleEntry (StoreEntry &)
 called when the entry is no longer needed by any transaction More...
 
void memoryOut (StoreEntry &, const bool preserveSwappable)
 called to get rid of no longer needed entry data in RAM, if any More...
 
void updateOnNotModified (StoreEntry *old, const StoreEntry &newer)
 update old entry metadata and HTTP headers using a newer entry More...
 
void allowCollapsing (StoreEntry *, const RequestFlags &, const HttpRequestMethod &)
 makes the entry available for collapsing future requests More...
 
void transientsCompleteWriting (StoreEntry &)
 marks the entry completed for collapsed requests More...
 
void syncCollapsed (const sfileno)
 Update local intransit entry after changes made by appending worker. More...
 
void transientsAbandon (StoreEntry &)
 calls Root().transients->abandon() if transients are tracked More...
 
int transientReaders (const StoreEntry &) const
 number of the transient entry readers some time ago More...
 
void transientsDisconnect (MemObject &)
 disassociates the entry from the intransit table More...
 
void memoryUnlink (StoreEntry &)
 removes the entry from the memory cache More...
 
void memoryDisconnect (StoreEntry &)
 disassociates the entry from the memory cache, preserving cached data More...
 

Public Attributes

bool statsCalled
 

Static Public Attributes

static int store_dirs_rebuilding = 1
 the number of cache_dirs being rebuilt; TODO: move to Disks::Rebuilding More...
 

Detailed Description

Definition at line 40 of file testStore.h.

Constructor & Destructor Documentation

TestStore::TestStore ( )
inline

Definition at line 44 of file testStore.h.

Member Function Documentation

int64_t Store::Controller::accumulateMore ( StoreEntry entry) const
inherited

Additional unknown-size entry bytes required by Store in order to reduce the risk of selecting the wrong disk cache for the growing entry.

Definition at line 348 of file Controller.cc.

Referenced by StoreEntry::mayStartSwapOut().

void Store::Controller::allowCollapsing ( StoreEntry e,
const RequestFlags reqFlags,
const HttpRequestMethod reqMethod 
)
inherited
int TestStore::callback ( )
virtual

Reimplemented from Store::Controller.

Definition at line 17 of file testStore.cc.

void Store::Controller::create ( )
overridevirtualinherited

Implements Store::Storage.

Definition at line 75 of file Controller.cc.

References pid, and WaitForAnyPid().

Referenced by SquidMain().

uint64_t TestStore::currentCount ( ) const
virtual

Reimplemented from Store::Controller.

Definition at line 55 of file testStore.cc.

uint64_t TestStore::currentSize ( ) const
virtual

Reimplemented from Store::Controller.

Definition at line 49 of file testStore.cc.

virtual bool TestStore::dereference ( StoreEntry )
inlinevirtual

Definition at line 74 of file testStore.h.

StoreEntry * TestStore::get ( const cache_key )
virtual

Reimplemented from Store::Controller.

Definition at line 23 of file testStore.cc.

References NULL.

void TestStore::get ( String  ,
void(*)(StoreEntry *, void *)  ,
void *   
)
virtual

Definition at line 29 of file testStore.cc.

void TestStore::getStats ( StoreInfoStats stats) const
virtual

Reimplemented from Store::Controller.

Definition at line 67 of file testStore.cc.

void TestStore::init ( )
virtual

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

Reimplemented from Store::Controller.

Definition at line 33 of file testStore.cc.

virtual void TestStore::maintain ( )
inlinevirtual

Reimplemented from Store::Controller.

Definition at line 56 of file testStore.h.

void Store::Controller::markForUnlink ( StoreEntry e)
overridevirtualinherited
int64_t TestStore::maxObjectSize ( ) const
virtual

Reimplemented from Store::Controller.

Definition at line 61 of file testStore.cc.

uint64_t TestStore::maxSize ( ) const
virtual

The maximum size the store will support in normal use. Inaccuracy is permitted, but may throw estimates for memory etc out of whack.

Reimplemented from Store::Controller.

Definition at line 37 of file testStore.cc.

void Store::Controller::memoryDisconnect ( StoreEntry e)
inherited

Definition at line 417 of file Controller.cc.

Referenced by StoreEntry::destroyMemObject().

void Store::Controller::memoryOut ( StoreEntry e,
const bool  preserveSwappable 
)
inherited

Definition at line 393 of file Controller.cc.

References debugs, HERE(), and StoreEntry::trimMemory().

Referenced by StoreEntry::swapOut().

void Store::Controller::memoryUnlink ( StoreEntry e)
inherited

Definition at line 408 of file Controller.cc.

References StoreEntry::destroyMemObject().

Referenced by StoreEntry::purgeMem(), and StoreEntry::release().

uint64_t TestStore::minSize ( ) const
virtual

Reimplemented from Store::Controller.

Definition at line 43 of file testStore.cc.

virtual void TestStore::reference ( StoreEntry )
inlinevirtual

Definition at line 72 of file testStore.h.

StoreSearch * TestStore::search ( )
virtual

Definition at line 78 of file testStore.cc.

References NULL.

bool Store::Controller::smpAware ( ) const
overridevirtualinherited

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

Implements Store::Storage.

Definition at line 609 of file Controller.cc.

Referenced by clientReplyContext::processExpired().

void TestStore::stat ( StoreEntry e) const
virtual

Output stats to the provided store entry.

Todo:
make these calls asynchronous

Reimplemented from Store::Controller.

Definition at line 72 of file testStore.cc.

References statsCalled.

void Store::Controller::sync ( void  )
overridevirtualinherited

Reimplemented from Store::Storage.

Definition at line 212 of file Controller.cc.

Referenced by SquidShutdown().

int Store::Controller::transientReaders ( const StoreEntry e) const
inherited
void Store::Controller::transientsAbandon ( StoreEntry e)
inherited
void Store::Controller::transientsCompleteWriting ( StoreEntry e)
inherited
void Store::Controller::transientsDisconnect ( MemObject mem_obj)
inherited

Definition at line 452 of file Controller.cc.

Referenced by StoreEntry::destroyMemObject().

void Store::Controller::unlink ( StoreEntry e)
overridevirtualinherited

Implements Store::Storage.

Definition at line 366 of file Controller.cc.

References StoreEntry::swap_filen.

Referenced by StoreEntry::release().

Member Data Documentation

bool TestStore::statsCalled

Definition at line 46 of file testStore.h.

Referenced by stat(), and testStore::testStats().


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

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors