General purpose Pool.
Public Methods
-
Pool(size_t initial, size_t max_)
- Creates Pool with initial size and max size.
-
virtual ~Pool()
-
virtual T* lease()
- Lease object from pool.
-
virtual void release(T* t)
- Releases instance back to pool
Protected Methods
-
virtual T* create()
- creates new instance.
Documentation
General purpose Pool.
Object can be 'leased' from pool,
and 'released' back to pool.
All access is synchronized.
Pool(size_t initial, size_t max_)
-
Creates Pool with initial size and max size.
'initial' objects are created immediately.
Later Pool can automatically grow up to 'max_'.
virtual ~Pool()
virtual T* lease()
-
Lease object from pool. After you are done with it
'release' it back. If no instance availiable this
method will create new one. If pool is reached its
maximum capacity this method will block until some
instance is is released.
virtual void release(T* t)
-
Releases instance back to pool
virtual T* create()
-
creates new instance. This method is called by pool
when it decides to create new instance. It could be overloaded
to provide custom object creation code.
- This class has no child classes.
Alphabetic index HTML hierarchy of classes or Java
This page was generated with the help of DOC++.