#include <ControllerPool.hpp>
Inheritance diagram for CarobNS::AbstractControllerPool:

Public Member Functions | |
| AbstractControllerPool (const std::vector< ControllerInfo > &controllerList, long retryIntervalInMs=0) throw (DriverException, UnexpectedException) | |
Creates a new AbstractControllerPool object. | |
| virtual | ~AbstractControllerPool () |
| Clears list of controllers. | |
| virtual ControllerInfo | getController ()=0 throw (NoMoreControllerException, UnexpectedException) |
| Gets a controller using the implementation specific policy. | |
| void | addRef () |
| Tells the pool that a new connection is using it. | |
| int | removeRef () |
| Tells the pool that one of its 'user' (ie. | |
| operator std::wstring () const | |
| Display useful info in a string. | |
Protected Attributes | |
| std::vector< ControllerInfo > | controller_list |
| list of valid controllers | |
| CriticalSection | pool_CS |
| class-wide mutex | |
| CarobNS::AbstractControllerPool::AbstractControllerPool | ( | const std::vector< ControllerInfo > & | controllerList, | |
| long | retryIntervalInMs = 0 | |||
| ) | throw (DriverException, UnexpectedException) |
Creates a new AbstractControllerPool object.
| controllerList | the controller list on which the policy applies | |
| retryIntervalInMs | IGNORED ! interval in milliseconds before retrying to re-connect to a controller that has failed |
| virtual ControllerInfo CarobNS::AbstractControllerPool::getController | ( | ) | throw (NoMoreControllerException, UnexpectedException) [pure virtual] |
Gets a controller using the implementation specific policy.
ControllerInfo of the selected controller | NoMoreControllerException | if no controller in the controller list is reachable |
Implemented in CarobNS::RoundRobinControllerPool.
| int CarobNS::AbstractControllerPool::removeRef | ( | ) | [inline] |
Tells the pool that one of its 'user' (ie.
connection) doesn't use it anymore, and return the new number of references
1.5.0