#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 |
| DbDriver * | driverPtr |
| int | waiting |
| int | nhandles |
| Handle * | firstPtr |
| Handle * | lastPtr |
| int | fVerbose |
| int | fVerboseError |
| time_t | maxidle |
| time_t | maxopen |
| int | stale_on_close |
| char * | name |
| Proxy * | firstPtr |
| char * | exec |
| char * | init |
| char * | reinit |
| int | avail |
| int | wthave |
| int | wtwant |
| int | nextid |
| int | tget |
| int | teval |
| int | twait |
| int | tsend |
| int | trecv |
| 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::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 |
| time_t Pool::maxidle |
| time_t Pool::maxopen |
| 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.
1.5.1