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

LimService Class Reference

#include <LimService.H>

List of all members.

Public Member Functions

 LimService (const Text &intfName, const int intfVersion, int maxRunning, int maxBlocked, LimService_Callback callback, LimService_FailureCallback failureCallback=NULL, void *arg=NULL, long stacksize=-1, const Text &hostName="", int failCode=1, const Text &failMessage=Text("connection refused: server busy")) throw ()
 LimService (const int intfVersion, int maxRunning, int maxBlocked, LimService_Callback callback, LimService_FailureCallback failureCallback=NULL, void *arg=NULL, long stacksize=-1, const Text &hostName="", int failCode=1, const Text &failMessage=Text("connection refused: server busy")) throw ()
 LimService (const Text &intfName, int maxRunning, int maxBlocked, LimService_Callback2 callback, LimService_FailureCallback failureCallback=NULL, void *arg=NULL, long stacksize=-1, const Text &hostName="", int failCode=1, const Text &failMessage=Text("connection refused: server busy")) throw ()
 LimService (const Text &intfName, int maxRunning, int maxBlocked, LimService_Callback2 callback, LimService_FailureCallback failureCallback, void *arg, const Basics::thread_attr &worker_attr, const Text &hostName="", int failCode=1, const Text &failMessage=Text("connection refused: server busy")) throw ()
 LimService (int maxRunning, int maxBlocked, LimService_Callback2 callback, LimService_FailureCallback failureCallback=NULL, void *arg=NULL, long stacksize=-1, const Text &hostName="", int failCode=1, const Text &failMessage=Text("connection refused: server busy")) throw ()
 ~LimService () throw ()
void Run () throw (SRPC::failure)
Basics::thread Forked_Run () throw (SRPC::failure)
Text IntfName () throw ()

Private Member Functions

void DecNumRunning () throw ()
void HandleFailure (const SRPC::failure &f) throw ()
void NewConnection (SRPC *srpc, int intfVersion, int procId) throw ()
LSWorkerNewWorker () throw ()
void RegisterIdleWorker (LSWorker *worker) throw ()
 LimService (const LimService &)
 LimService (LimService &)
void operator= (LimService &)

Private Attributes

Text intfName
int intfVersion
int maxRunning
int maxTotal
LimService_Callback callback
LimService_Callback2 callback2
LimService_FailureCallback failureCallback
void * arg
Basics::thread_attr worker_attributes
Text hostName
int failCode
Text failMessage
TCP_socksock
Basics::mutex mu
int numRunning
int numBlocked
Basics::cond server_avail
WorkerListidleWorkers
bool server_state_change
Basics::cond state_change
SRPC::failure server_failure

Friends

void * LimService_Worker (void *) throw ()
void * LimService_StartServer (void *) throw ()

Classes

struct  WorkerList


Constructor & Destructor Documentation

LimService::LimService const Text intfName,
const int  intfVersion,
int  maxRunning,
int  maxBlocked,
LimService_Callback  callback,
LimService_FailureCallback  failureCallback = NULL,
void *  arg = NULL,
long  stacksize = -1,
const Text hostName = "",
int  failCode = 1,
const Text failMessage = Text("connection refused: server busy")
throw ()
 

Definition at line 50 of file LimService.C.

References Basics::mutex::lock(), mu, and Basics::mutex::unlock().

LimService::LimService const int  intfVersion,
int  maxRunning,
int  maxBlocked,
LimService_Callback  callback,
LimService_FailureCallback  failureCallback = NULL,
void *  arg = NULL,
long  stacksize = -1,
const Text hostName = "",
int  failCode = 1,
const Text failMessage = Text("connection refused: server busy")
throw ()
 

Definition at line 75 of file LimService.C.

References Basics::mutex::lock(), mu, NEW, and Basics::mutex::unlock().

LimService::LimService const Text intfName,
int  maxRunning,
int  maxBlocked,
LimService_Callback2  callback,
LimService_FailureCallback  failureCallback = NULL,
void *  arg = NULL,
long  stacksize = -1,
const Text hostName = "",
int  failCode = 1,
const Text failMessage = Text("connection refused: server busy")
throw ()
 

Definition at line 107 of file LimService.C.

References SRPC::default_intf_version, Basics::mutex::lock(), mu, and Basics::mutex::unlock().

LimService::LimService const Text intfName,
int  maxRunning,
int  maxBlocked,
LimService_Callback2  callback,
LimService_FailureCallback  failureCallback,
void *  arg,
const Basics::thread_attr worker_attr,
const Text hostName = "",
int  failCode = 1,
const Text failMessage = Text("connection refused: server busy")
throw ()
 

Definition at line 133 of file LimService.C.

References SRPC::default_intf_version, Basics::mutex::lock(), mu, and Basics::mutex::unlock().

LimService::LimService int  maxRunning,
int  maxBlocked,
LimService_Callback2  callback,
LimService_FailureCallback  failureCallback = NULL,
void *  arg = NULL,
long  stacksize = -1,
const Text hostName = "",
int  failCode = 1,
const Text failMessage = Text("connection refused: server busy")
throw ()
 

Definition at line 157 of file LimService.C.

References SRPC::default_intf_version, Basics::mutex::lock(), mu, NEW, and Basics::mutex::unlock().

LimService::~LimService  )  throw () [inline]
 

Definition at line 149 of file LimService.H.

References sock.

LimService::LimService const LimService  )  [private]
 

LimService::LimService LimService  )  [private]
 


Member Function Documentation

void LimService::DecNumRunning  )  throw () [private]
 

Definition at line 270 of file LimService.C.

References Basics::mutex::lock(), mu, numRunning, server_avail, Basics::cond::signal(), and Basics::mutex::unlock().

Basics::thread LimService::Forked_Run  )  throw (SRPC::failure)
 

Definition at line 249 of file LimService.C.

References Basics::thread::fork(), Basics::thread_attr::get_stacksize(), LimService_StartServer(), Basics::mutex::lock(), mu, SRPC::failure::r, Basics::thread_attr::set_stacksize(), and Basics::mutex::unlock().

Referenced by init(), Server(), ShortIdServerExport(), and VestaSourceServerExport().

void LimService::HandleFailure const SRPC::failure f  )  throw () [private]
 

Definition at line 226 of file LimService.C.

References Basics::mutex::lock(), mu, and Basics::mutex::unlock().

Referenced by LimService_StartServer().

Text LimService::IntfName  )  throw () [inline]
 

Definition at line 207 of file LimService.H.

Referenced by init().

void LimService::NewConnection SRPC srpc,
int  intfVersion,
int  procId
throw () [private]
 

Definition at line 283 of file LimService.C.

References SRPC::default_proc_id, Basics::mutex::lock(), SRPC::failure::msg, mu, SRPC::failure::r, and Basics::mutex::unlock().

Referenced by LimService_Worker().

LSWorker * LimService::NewWorker  )  throw () [private]
 

Definition at line 351 of file LimService.C.

References idleWorkers, Basics::mutex::lock(), mu, NEW_CONSTR, LimService::WorkerList::next, Basics::mutex::unlock(), and LimService::WorkerList::worker.

Referenced by Run().

void LimService::operator= LimService  )  [private]
 

void LimService::RegisterIdleWorker LSWorker worker  )  throw () [private]
 

Definition at line 369 of file LimService.C.

References Basics::mutex::lock(), mu, NEW, LimService::WorkerList::next, Basics::mutex::unlock(), and LimService::WorkerList::worker.

Referenced by LimService_Worker().

void LimService::Run  )  throw (SRPC::failure)
 

Definition at line 189 of file LimService.C.

References arg, SRPC::await_call(), SRPC::callee, SRPC::default_proc_id, failureCallback, hostName, intfName, intfVersion, Basics::mutex::lock(), mu, NEW_CONSTR, NewWorker(), server_state_change, Basics::cond::signal(), sock, LSWorker::Start(), state_change, and Basics::mutex::unlock().

Referenced by LimService_StartServer(), main(), ExpCache::Run(), and Server().


Friends And Related Function Documentation

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

Definition at line 237 of file LimService.C.

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

Definition at line 392 of file LimService.C.


Member Data Documentation

void* LimService::arg [private]
 

Definition at line 261 of file LimService.H.

Referenced by Run().

LimService_Callback LimService::callback [private]
 

Definition at line 258 of file LimService.H.

LimService_Callback2 LimService::callback2 [private]
 

Definition at line 259 of file LimService.H.

int LimService::failCode [private]
 

Definition at line 264 of file LimService.H.

Text LimService::failMessage [private]
 

Definition at line 265 of file LimService.H.

LimService_FailureCallback LimService::failureCallback [private]
 

Definition at line 260 of file LimService.H.

Referenced by Run().

Text LimService::hostName [private]
 

Definition at line 263 of file LimService.H.

Referenced by Run().

WorkerList* LimService::idleWorkers [private]
 

Definition at line 272 of file LimService.H.

Referenced by NewWorker().

Text LimService::intfName [private]
 

Definition at line 254 of file LimService.H.

Referenced by Run().

int LimService::intfVersion [private]
 

Definition at line 255 of file LimService.H.

Referenced by Run().

int LimService::maxRunning [private]
 

Definition at line 256 of file LimService.H.

int LimService::maxTotal [private]
 

Definition at line 257 of file LimService.H.

Basics::mutex LimService::mu [private]
 

Definition at line 269 of file LimService.H.

Referenced by DecNumRunning(), NewWorker(), and Run().

int LimService::numBlocked [private]
 

Definition at line 270 of file LimService.H.

int LimService::numRunning [private]
 

Definition at line 270 of file LimService.H.

Referenced by DecNumRunning().

Basics::cond LimService::server_avail [private]
 

Definition at line 271 of file LimService.H.

Referenced by DecNumRunning().

SRPC::failure LimService::server_failure [private]
 

Definition at line 275 of file LimService.H.

bool LimService::server_state_change [private]
 

Definition at line 273 of file LimService.H.

Referenced by Run().

TCP_sock* LimService::sock [private]
 

Definition at line 266 of file LimService.H.

Referenced by Run(), and ~LimService().

Basics::cond LimService::state_change [private]
 

Definition at line 274 of file LimService.H.

Referenced by Run().

Basics::thread_attr LimService::worker_attributes [private]
 

Definition at line 262 of file LimService.H.


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