11 #ifndef _LIBALCOMMON_ALCOMMON_ALBROKERMANAGER_H_
12 #define _LIBALCOMMON_ALCOMMON_ALBROKERMANAGER_H_
15 # include <boost/shared_ptr.hpp>
22 class ALBrokerManagerImpl;
47 void addBroker(boost::shared_ptr<ALBroker> pBroker);
54 void removeBroker(boost::shared_ptr<ALBroker> pBroker);
62 void removeFromList(boost::shared_ptr<ALBroker> pBroker);
70 boost::shared_ptr<ALBroker> getRandomBroker(
void);
77 boost::shared_ptr<ALBroker> getBroker(
int i);
85 boost::shared_ptr<ALBroker> getBrokerByIPPort(
const std::string &strEndPoint);
95 boost::shared_ptr<ALBroker> getBrokerByIPPort(
const std::string &strIP,
104 boost::shared_ptr<ALBroker> getBrokerByParentIPPort(
const std::string &strIP,
int pPort);
110 void killAllBroker(
void);
116 boost::shared_ptr<ALBroker> getReservedBroker(
void);
122 static boost::shared_ptr<ALBrokerManager> getInstance();
130 static boost::shared_ptr<ALBrokerManager> setInstance(boost::shared_ptr<ALBrokerManager> pSingleton);
139 static boost::shared_ptr<ALBrokerManager> _singleton;
141 ALBrokerManagerImpl *_private;
144 #endif // _LIBALCOMMON_ALCOMMON_ALBROKERMANAGER_H_