| java.lang.Object com.martiansoftware.nailgun.NGSessionPool
NGSessionPool | class NGSessionPool (Code) | | Provides NGSession pooling functionality. One parameter, "maxIdle",
governs its behavior by setting the maximum number of idle NGSession
threads it will allow. It creates a pool of size maxIdle - 1, because
one NGSession is kept "on deck" by the NGServer in order to eke out
a little extra responsiveness.
author: Marty Lamb |
done | boolean done(Code) | | have we been shut down?
|
poolEntries | int poolEntries(Code) | | The number of sessions currently in the pool
|
poolSize | int poolSize(Code) | | number of sessions to store in the pool
|
NGSessionPool | NGSessionPool(NGServer server, int maxIdle)(Code) | | Creates a new NGSessionRunner operating for the specified server, with
the specified number of threads
Parameters: server - the server to work for Parameters: poolSize - the maximum number of idle threads to allow |
give | void give(NGSession session)(Code) | | Returns an NGSession to the pool. The pool may choose to shutdown
the thread if the pool is full
Parameters: session - the NGSession to return to the pool |
shutdown | void shutdown()(Code) | | Shuts down the pool. Running nails are allowed to finish.
|
take | NGSession take()(Code) | | Returns an NGSession from the pool, or creates one if necessary
an NGSession ready to work |
|
|