Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

TestCache.C File Reference

#include <time.h>
#include <Basics.H>
#include <Table.H>
#include <Generics.H>
#include <SRPC.H>
#include <FP.H>
#include <CacheArgs.H>
#include <CacheIntf.H>
#include <PKPrefix.H>
#include <Model.H>
#include <CacheIndex.H>
#include <FV.H>
#include <VestaVal.H>
#include <CompactFV.H>
#include <FV2.H>
#include <Debug.H>
#include "CacheC.H"
#include "DebugC.H"
#include "WeederC.H"

Go to the source code of this file.

Typedefs

typedef TextIntTbl NameMap

Functions

void ErrMsg (char *msg, bool halt=true) throw ()
bool SkipWhite (istream &ins, bool echoComments)
void Checkpoint (istream &ins, CacheC &client) throw (SRPC::failure)
void FlushAll (DebugC &debug) throw (SRPC::failure)
void Pause (istream &ins) throw ()
void ReadCIs (istream &ins, CacheEntry::Indices &cis) throw ()
void ReadBits (istream &ins, BitVector &cis) throw ()
void ReadPfxs (istream &ins, PKPrefixTbl &pfxs) throw ()
void RenewLeases (istream &ins, CacheC &client) throw (SRPC::failure)
void StartMark (WeederC &client) throw (SRPC::failure)
void SetHitFilter (WeederC &client, const BitVector &cis) throw (SRPC::failure)
void ResumeLeaseExp (WeederC &client) throw (SRPC::failure)
void EndMark (WeederC &client, const BitVector &cis, const PKPrefixTbl &pfxs) throw (SRPC::failure)
void Weed (istream &ins, WeederC &client) throw (SRPC::failure)
FV::Epoch FreeVariables (CacheC &client, const FP::Tag &pk, CompactFV::List &names) throw (SRPC::failure)
CacheIntf::LookupRes Lookup (CacheC &client, const FP::Tag &pk, FV::Epoch epoch, const FP::List &fps) throw (SRPC::failure)
CacheIntf::AddEntryRes AddEntry (CacheC &client, const FP::Tag &pk, const char *types, const FV2::ListApp &allNames, const FP::List &fps, const VestaVal::T &value) throw (SRPC::failure)
void CallCache (istream &ins, CacheC &client, const FP::Tag &pk) throw (SRPC::failure)
void RunTest (istream &ins, bool echoComments) throw (SRPC::failure)
void Exit (char *msg) throw ()
int main (int argc, char *argv[])

Variables

const char CommentChar = '%'
const char Newline = '\n'
const int MaxWordLen = 80
const char * CheckpointOnlyCmd = "CheckpointOnly"
const char * CheckpointCmd = "Checkpoint"
const char * PauseCmd = "Pause"
const char * RenewCmd = "RenewLeases"
const char * WeedCmd = "Weed"


Typedef Documentation

typedef TextIntTbl NameMap
 

Definition at line 76 of file TestCache.C.


Function Documentation

CacheIntf::AddEntryRes AddEntry CacheC client,
const FP::Tag pk,
const char *  types,
const FV2::ListApp allNames,
const FP::List fps,
const VestaVal::T value
throw (SRPC::failure)
 

Definition at line 262 of file TestCache.C.

Referenced by CallCache(), and VPKFile::UpdateUncommonList().

void CallCache istream &  ins,
CacheC client,
const FP::Tag pk
throw (SRPC::failure)
 

Definition at line 276 of file TestCache.C.

References AddEntry(), Sequence< Elem, elem_ptrfree >::addlo(), FV2::ListApp::Append(), CacheIntf::BadAddEntryArgs, CacheIntf::BadLookupArgs, ErrMsg(), FP::List::fp, FreeVariables(), CacheIntf::FVMismatch, Table< K, V >::Default::Get(), PrefixTbl::Get(), Sequence< Elem, elem_ptrfree >::getlo(), CompactFV::List::idx, FP::List::len, FV2::List::len, VestaSourceSRPC::Lookup, CacheIntf::Miss, FV2::List::name, NEW_CONSTR, NEW_PTRFREE_ARRAY, Newline, CacheIntf::NoLease, CompactFV::List::num, Table< K, V >::Default::Put(), Sequence< Elem, elem_ptrfree >::remlo(), Sequence< Elem, elem_ptrfree >::size(), CompactFV::List::tbl, FV2::T::ToText(), and CompactFV::List::types.

Referenced by RunTest().

void Checkpoint istream &  ins,
CacheC client
throw (SRPC::failure)
 

Definition at line 114 of file TestCache.C.

References ErrMsg(), and Newline.

Referenced by ApplicationFromCache(), ShortIdBlock::checkpoint(), ModelFromCache(), NormalModelFromCache(), RunTest(), RunToolFromCache(), and ShortIdReceptionist().

void EndMark WeederC client,
const BitVector cis,
const PKPrefixTbl pfxs
throw (SRPC::failure)
 

Definition at line 222 of file TestCache.C.

Referenced by Weed().

void ErrMsg char *  msg,
bool  halt = true
throw ()
 

Definition at line 78 of file TestCache.C.

Referenced by CallCache(), Checkpoint(), main(), Pause(), ReadBits(), RenewLeases(), and Weed().

void Exit char *  msg  )  throw ()
 

Definition at line 402 of file TestCache.C.

Referenced by main().

void FlushAll DebugC debug  )  throw (SRPC::failure)
 

Definition at line 125 of file TestCache.C.

References FlushAll().

Referenced by FlushAll(), and RunTest().

FV::Epoch FreeVariables CacheC client,
const FP::Tag pk,
CompactFV::List names
throw (SRPC::failure)
 

Definition at line 244 of file TestCache.C.

Referenced by CallCache().

CacheIntf::LookupRes Lookup CacheC client,
const FP::Tag pk,
FV::Epoch  epoch,
const FP::List fps
throw (SRPC::failure)
 

Definition at line 251 of file TestCache.C.

int main int  argc,
char *  argv[]
 

Definition at line 410 of file TestCache.C.

References Text::chars(), ErrMsg(), Exit(), FS::IsFile(), SRPC::failure::msg, NEW_CONSTR, RunTest(), and CacheArgs::StartsWith().

void Pause istream &  ins  )  throw ()
 

Definition at line 130 of file TestCache.C.

References ErrMsg(), and Newline.

Referenced by MainClientProc(), RunTest(), and ServerCallback().

void ReadBits istream &  ins,
BitVector cis
throw ()
 

Definition at line 167 of file TestCache.C.

References ErrMsg(), and Newline.

Referenced by Weed().

void ReadCIs istream &  ins,
CacheEntry::Indices cis
throw ()
 

Definition at line 139 of file TestCache.C.

References NEW_PTRFREE_ARRAY, and Newline.

Referenced by RenewLeases().

void ReadPfxs istream &  ins,
PKPrefixTbl pfxs
throw ()
 

Definition at line 183 of file TestCache.C.

References Newline.

Referenced by Weed().

void RenewLeases istream &  ins,
CacheC client
throw (SRPC::failure)
 

Definition at line 197 of file TestCache.C.

References ErrMsg(), Newline, and ReadCIs().

Referenced by RunTest(), and StartRenewLeaseThread().

void ResumeLeaseExp WeederC client  )  throw (SRPC::failure)
 

Definition at line 217 of file TestCache.C.

Referenced by Weed().

void RunTest istream &  ins,
bool  echoComments
throw (SRPC::failure)
 

Definition at line 374 of file TestCache.C.

References CacheIntf::All, CallCache(), Checkpoint(), CheckpointCmd, CheckpointOnlyCmd, FlushAll(), Pause(), PauseCmd, RenewCmd, RenewLeases(), SkipWhite(), Weed(), and WeedCmd.

void SetHitFilter WeederC client,
const BitVector cis
throw (SRPC::failure)
 

Definition at line 212 of file TestCache.C.

Referenced by Weed().

bool SkipWhite istream &  ins,
bool  echoComments
 

Definition at line 85 of file TestCache.C.

References CommentChar, and Newline.

Referenced by RunTest().

void StartMark WeederC client  )  throw (SRPC::failure)
 

Definition at line 206 of file TestCache.C.

Referenced by Weed().

void Weed istream &  ins,
WeederC client
throw (SRPC::failure)
 

Definition at line 228 of file TestCache.C.

References EndMark(), ErrMsg(), Newline, ReadBits(), ReadPfxs(), ResumeLeaseExp(), SetHitFilter(), and StartMark().

Referenced by RunTest().


Variable Documentation

const char* CheckpointCmd = "Checkpoint"
 

Definition at line 69 of file TestCache.C.

Referenced by RunTest().

const char* CheckpointOnlyCmd = "CheckpointOnly"
 

Definition at line 68 of file TestCache.C.

Referenced by RunTest().

const char CommentChar = '%'
 

Definition at line 65 of file TestCache.C.

Referenced by SkipWhite().

const int MaxWordLen = 80
 

Definition at line 67 of file TestCache.C.

const char Newline = '\n'
 

Definition at line 66 of file TestCache.C.

Referenced by CallCache(), Checkpoint(), Pause(), ReadBits(), ReadCIs(), ReadPfxs(), RenewLeases(), SkipWhite(), and Weed().

const char* PauseCmd = "Pause"
 

Definition at line 70 of file TestCache.C.

Referenced by RunTest().

const char* RenewCmd = "RenewLeases"
 

Definition at line 71 of file TestCache.C.

Referenced by RunTest().

const char* WeedCmd = "Weed"
 

Definition at line 72 of file TestCache.C.

Referenced by RunTest().


Generated on Mon May 8 00:49:00 2006 for Vesta by  doxygen 1.4.2