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

Leases Class Reference

#include <Leases.H>

List of all members.

Public Member Functions

 Leases (Basics::mutex *mu, int timeout, bool debug=false) throw ()
BitVectorLeaseSet () const throw ()
void NewLease (int li) throw ()
void RenewLease (int li) throw (NoLease)
bool IsLeased (int li) throw ()
void DisableExpiration () throw ()
void EnableExpiration () throw ()
bool ExpirationIsEnabled () const throw ()
void Debug (std::ostream &os) const throw ()

Private Member Functions

void Expire () throw ()
 Leases (const Leases &)

Private Attributes

int timeout
bool debug
Basics::mutexmu
bool expiring
BitVectoroldLs
BitVectornewLs

Friends

void * Leases_TimeoutProc (void *) throw ()

Classes

class  NoLease


Constructor & Destructor Documentation

Leases::Leases Basics::mutex mu,
int  timeout,
bool  debug = false
throw ()
 

Definition at line 51 of file Leases.C.

References Basics::thread::fork_and_detach(), Leases_TimeoutProc(), mu, and NEW.

Leases::Leases const Leases  )  [private]
 


Member Function Documentation

void Leases::Debug std::ostream &  os  )  const throw ()
 

Definition at line 74 of file Leases.C.

Referenced by Expire().

void Leases::DisableExpiration  )  throw () [inline]
 

Definition at line 77 of file Leases.H.

References expiring.

void Leases::EnableExpiration  )  throw () [inline]
 

Definition at line 82 of file Leases.H.

References expiring.

Referenced by CacheS::ResumeLeaseExp().

bool Leases::ExpirationIsEnabled  )  const throw () [inline]
 

Definition at line 86 of file Leases.H.

References expiring.

void Leases::Expire  )  throw () [private]
 

Definition at line 80 of file Leases.C.

References Debug(), Debug::Lock(), Basics::mutex::lock(), mu, newLs, oldLs, BitVector::ResetAll(), Debug::Timestamp(), Basics::mutex::unlock(), and Debug::Unlock().

Referenced by Leases_TimeoutProc().

bool Leases::IsLeased int  li  )  throw () [inline]
 

Definition at line 72 of file Leases.H.

References newLs, oldLs, and BitVector::Read().

Referenced by RenewLease().

BitVector * Leases::LeaseSet  )  const throw ()
 

Definition at line 64 of file Leases.C.

References NEW_CONSTR.

Referenced by CacheS::GetLeases().

void Leases::NewLease int  li  )  throw () [inline]
 

Definition at line 61 of file Leases.H.

References newLs, and BitVector::Set().

Referenced by RenewLease().

void Leases::RenewLease int  li  )  throw (NoLease) [inline]
 

Definition at line 65 of file Leases.H.

References IsLeased(), and NewLease().


Friends And Related Function Documentation

void* Leases_TimeoutProc void *  arg  )  throw () [friend]
 

Definition at line 33 of file Leases.C.


Member Data Documentation

bool Leases::debug [private]
 

Definition at line 99 of file Leases.H.

bool Leases::expiring [private]
 

Definition at line 103 of file Leases.H.

Referenced by DisableExpiration(), EnableExpiration(), and ExpirationIsEnabled().

Basics::mutex* Leases::mu [private]
 

Definition at line 102 of file Leases.H.

Referenced by Expire().

BitVector * Leases::newLs [private]
 

Definition at line 104 of file Leases.H.

Referenced by Expire(), IsLeased(), and NewLease().

BitVector* Leases::oldLs [private]
 

Definition at line 104 of file Leases.H.

Referenced by Expire(), and IsLeased().

int Leases::timeout [private]
 

Definition at line 98 of file Leases.H.

Referenced by Leases_TimeoutProc().


The documentation for this class was generated from the following files:
Generated on Mon May 8 00:49:10 2006 for Vesta by  doxygen 1.4.2