Module: Extlib::Pooling

Module | Extlib::Pooling
In: | lib/extlib/pooling.rb

#### Notes

Provides pooling support to class it got included in.

Pooling of objects is a faster way of aquiring instances of objects compared to regular allocation and initialization because instances are keeped in memory reused.

Classes that include Pooling module have re-defined new method that returns instances acquired from pool.

Term resource is used for any type of poolable objects and should NOT be thought as DataMapper Resource or ActiveResource resource and such.

In Data Objects connections are pooled so that it is unnecessary to allocate and initialize connection object each time connection is needed, like per request in a web application.

Pool obviously has to be thread safe because state of object is reset when it is released.

### Methods

__pool_lock __pool_wait __pools append_pool detach included lock new pool_size pools release scavenger scavenger? scavenger_interval

### Classes and Modules

Class Extlib::Pooling::InvalidResourceError
Class Extlib::Pooling::Pool

### External Aliases

new | -> | __new

### Public Class methods

__pool_lock()
__pool_wait()
__pools()
append_pool(pool)
included(target)
lock()
new(*args)
pool_size()
pools()
scavenger()
scavenger?()
scavenger_interval()

### Public Instance methods

detach()
release()

[Validate]