Pool Struct Reference

#include <nsd.h>


Data Fields

Ns_Mutex lock
Ns_Cond cond
char * name
int shutdown
struct {
   struct {
      int   num
      Conn *   firstPtr
      Conn *   lastPtr
   }   wait
   struct {
      Conn *   firstPtr
      Conn *   lastPtr
   }   active
queue
struct {
   unsigned int   nextid
   int   min
   int   max
   int   current
   int   idle
   int   timeout
   int   maxconns
   unsigned int   queued
threads
char * name
char * desc
char * source
char * user
char * pass
int type
Ns_Cond waitCond
Ns_Cond getCond
char * driver
DbDriverdriverPtr
int waiting
int nhandles
HandlefirstPtr
HandlelastPtr
int fVerbose
int fVerboseError
time_t maxidle
time_t maxopen
int stale_on_close
char * name
ProxyfirstPtr
char * exec
char * init
char * reinit
int avail
int wthave
int wtwant
int nextid
int tget
int teval
int twait
int tsend
int trecv


Detailed Description

The following structure maintains a connection thread pool.


Field Documentation

Ns_Mutex Pool::lock

Receive timeout.

Ns_Cond Pool::cond

Lock around pool.

char* Pool::name

int Pool::shutdown

int Pool::num

struct Conn* Pool::firstPtr

struct Conn* Pool::lastPtr

struct { ... } Pool::wait

struct Conn* Pool::firstPtr

struct Conn* Pool::lastPtr

struct { ... } Pool::active

struct { ... } Pool::queue

The following struct maintains the active and waiting connection queues, the next conn id, and the number of waiting connects.

unsigned int Pool::nextid

int Pool::min

Max number of handles.

int Pool::max

Thread waiting for handles.

int Pool::current

int Pool::idle

int Pool::timeout

int Pool::maxconns

unsigned int Pool::queued

struct { ... } Pool::threads

The following struct maintins the state of the threads. Min and max threads are determined at startup and then NsQueueConn ensures the current number of threads remains within that range with individual threads waiting no more than the timeout for a connection to arrive. The number of idle threads is maintained for the benefit of the ns_server command. Threads will handle up to maxconns before exit (default is the "connsperthread" virtual server config).

char* Pool::name

char* Pool::desc

char* Pool::source

char* Pool::user

char* Pool::pass

int Pool::type

Ns_Cond Pool::waitCond

Ns_Cond Pool::getCond

char* Pool::driver

struct DbDriver* Pool::driverPtr

int Pool::waiting

Re-init scripts to eval on proxy put.

int Pool::nhandles

struct Handle* Pool::firstPtr

struct Handle* Pool::lastPtr

int Pool::fVerbose

int Pool::fVerboseError

time_t Pool::maxidle

time_t Pool::maxopen

int Pool::stale_on_close

char* Pool::name

struct Proxy* Pool::firstPtr

Name of pool.

char* Pool::exec

First in list of avail proxies.

char* Pool::init

Slave executable.

char* Pool::reinit

Init script to eval on proxy start.

int Pool::avail

Min number of handles.

int Pool::wthave

Current number of available proxies.

int Pool::wtwant

Total owned by waiting threads.

int Pool::nextid

Total requested of waiting threads.

int Pool::tget

Next in proxy unique ids.

int Pool::teval

Default get timeout.

int Pool::twait

Default eval timeout.

int Pool::tsend

Default wait timeout.

int Pool::trecv

Send timeout.


The documentation for this struct was generated from the following files:
Generated on Tue Sep 4 19:58:57 2007 by  doxygen 1.5.1