#include <sys/types.h>
#include <dirent.h>
#include <pthread.h>
#include <time.h>
#include <stdlib.h>
#include <sys/stat.h>
#include <ctype.h>
#include <VestaConfig.H>
#include <Thread.H>
#include "ShortIdImpl.H"
#include "VestaLog.H"
#include "Recovery.H"
#include "ReadersWritersLock.H"
#include "ShortIdKey.H"
#include "FdCache.H"
#include "VRConcurrency.H"
#include "logging.H"
#include "lock_timing.H"
Go to the source code of this file.
Defines | |
#define | USE_RANDOM_R 1 |
Typedefs | |
typedef Table< ShortIdKey, ShortIdBlockInfo * >::Default | BlockInfoTable |
typedef Table< ShortIdKey, ShortIdBlockInfo * >::Iterator | BlockInfoIter |
Functions | |
int | _Preaddir_r (DIR *, struct dirent *, struct dirent **) |
void | AcquireShortIdBlock (ShortIdBlock &bk, bool leafflag, bool local) throw () |
bool | RenewShortIdBlock (ShortIdBlock &bk) throw () |
void | ReleaseShortIdBlock (ShortIdBlock &bk, bool local) throw () |
void * | LandlordThread (void *arg) |
void | ShortIdBlockCheckpoint (fstream &ckpt) throw () |
int | DeleteAllShortIdsBut (ShortIdsFile sidfile, time_t lease) throw () |
void | ShortIdServerInit () |
void | ShortIdServerInit2 () |
Variables | |
const int | LEASE_PERIOD = 60*60*24 |
const int | LANDLORD_SLEEP = 60*60 |
const int | LANDLORD_WORKLIST_SIZE = 128 |
random_data | randDat |
int | randState [32] |
|
Definition at line 63 of file ShortIdImpl.C. |
|
Definition at line 70 of file ShortIdImpl.C. |
|
Definition at line 69 of file ShortIdImpl.C. |
|
|
|
|
Definition at line 578 of file ShortIdImpl.C. References Text::cchars(), DBG_ALWAYS, Repos::dprintf(), and SourceOrDerived::open(). Referenced by DoDeletions(). |
|
Definition at line 292 of file ShortIdImpl.C. References ReadersWritersLock::acquireWrite(), LANDLORD_SLEEP, LANDLORD_WORKLIST_SIZE, ShortIdBlockInfo::leaseExpires, Basics::mutex::lock(), Table< K, V >::Iterator::Next(), ReadersWritersLock::releaseWrite(), RWLOCK_LOCKED_REASON, ShortIdKey::sid, StableLock, and Basics::mutex::unlock(). Referenced by ShortIdServerInit2(). |
|
Definition at line 263 of file ShortIdImpl.C. References ReadersWritersLock::acquireWrite(), Basics::mutex::lock(), ReadersWritersLock::releaseWrite(), RWLOCK_LOCKED_REASON, StableLock, and Basics::mutex::unlock(). Referenced by ShortIdBlock::release(), and ShortIdReceptionist(). |
|
Definition at line 204 of file ShortIdImpl.C. References ReadersWritersLock::acquireWrite(), VestaLog::commit(), Table< K, V >::Default::Delete(), LEASE_PERIOD, ShortIdBlockInfo::leaseExpires, Basics::mutex::lock(), Table< K, V >::Default::Put(), VestaLog::put(), ReadersWritersLock::releaseWrite(), RWLOCK_LOCKED_REASON, StableLock, VestaLog::start(), Basics::mutex::unlock(), and VRLog. Referenced by ShortIdReceptionist(). |
|
Definition at line 381 of file ShortIdImpl.C. References ShortIdBlockInfo::leaseExpires, Basics::mutex::lock(), Table< K, V >::Iterator::Next(), ShortIdKey::sid, and Basics::mutex::unlock(). Referenced by CheckpointServer(). |
|
Definition at line 603 of file ShortIdImpl.C. References DBG_ALWAYS, Repos::dprintf(), VestaConfig::get(), randDat, randState, and RegisterRecoveryCallback(). Referenced by main(). |
|
Definition at line 633 of file ShortIdImpl.C. References Basics::thread::fork(), and LandlordThread(). Referenced by main(). |
|
Definition at line 74 of file ShortIdImpl.C. Referenced by LandlordThread(). |
|
Definition at line 75 of file ShortIdImpl.C. Referenced by LandlordThread(). |
|
Definition at line 73 of file ShortIdImpl.C. Referenced by AcquireShortIdBlock(), and RenewShortIdBlock(). |
|
Definition at line 80 of file ShortIdImpl.C. Referenced by AcquireShortIdBlock(), and ShortIdServerInit(). |
|
Definition at line 81 of file ShortIdImpl.C. Referenced by ShortIdServerInit(). |