Pool class template which stores class instances, has the
following features:
* Get and recycle items. Recycled items will be re-used before creating
new items.
* The total number of items, as well as the number of idle or busy items
in the pool can be queried.
* 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.
* The entire pool can be emptied, returning all items to the idle state,
with clear().
* Iteration over all items in the pool, or all busy or idle items. (See
further notes in the super class.)
* For classes with a default (parameterless) constructor, get() and
fill() methods exist which automatically create new pool items,
without requiring them to be passed via a lazy argument.
An additional class template exists, the AutoCtorPool, which automatically
creates new instances of the specified class by calling the constructor
with a fixed set of parameters.
Also see: ocean.util.container.pool.model.IAggregatePool, for more detailed
documentation and usage examples.
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).
Pool class template which stores class instances, has the following features: * Get and recycle items. Recycled items will be re-used before creating new items. * The total number of items, as well as the number of idle or busy items in the pool can be queried. * 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. * The entire pool can be emptied, returning all items to the idle state, with clear(). * Iteration over all items in the pool, or all busy or idle items. (See further notes in the super class.) * For classes with a default (parameterless) constructor, get() and fill() methods exist which automatically create new pool items, without requiring them to be passed via a lazy argument.
An additional class template exists, the AutoCtorPool, which automatically creates new instances of the specified class by calling the constructor with a fixed set of parameters.
Also see: ocean.util.container.pool.model.IAggregatePool, for more detailed documentation and usage examples.