ocean.util.container.pool.model.IPool

Base class for all types of pool. Provides the following features: * A set of items, each either busy or idle. * Idle items can be got from the pool, thus becoming busy, using get(). * Busy items can be returned to the pool, thus becoming idle, with recycle(). * The total number of items in the pool, as well as the number of busy or idle items can be queried. * The entire pool can be emptied, returning all items to the idle state, with clear(). * A limit can be applied to the pool, which prevents more than the specified number of items from being created. * A specified number of items can be pre-allocated in the pool using the fill() method.

Each item in the pool has an index, which allows a simple lookup of an item to its position in the internal array of items. The item index is defined by the abstract methods setItemIndex() and getItemIndex() (i.e. in the base class there is no definition of how this item index is implemented).

Note that the IPool class is abstract, and provides only the internal framework required for getting and recycling pool items (see get_() and recycle_()).

Members

Classes

IPool
class IPool

Core pool implementation.

LimitExceededException
class LimitExceededException

LimitExceededException class

Meta

License

Boost Software License Version 1.0. See LICENSE_BOOST.txt for details. Alternatively, this file may be distributed under the terms of the Tango 3-Clause BSD License (see LICENSE_BSD.txt for details).