类 PoolUpdater
java.lang.Object
com.alibaba.druid.pool.ha.node.PoolUpdater
- 所有已实现的接口:
Observer
Update the DataSource Connection Pool when notified.
- 作者:
- DigitalSonic
-
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明protected voidprotected voiddeleteNode(NodeEvent event) voiddestroy()intvoidinit()Create a ScheduledExecutorService to remove unused DataSources.booleanbooleanisInited()voidRemove unused DataSources.voidsetAllowEmptyPool(boolean allowEmptyPool) voidsetHighAvailableDataSource(HighAvailableDataSource highAvailableDataSource) voidsetIntervalSeconds(int intervalSeconds) voidupdate(Observable o, Object arg) Process the given NodeEvent[].
-
字段详细资料
-
DEFAULT_INTERVAL
public static final int DEFAULT_INTERVAL- 另请参阅:
-
-
构造器详细资料
-
PoolUpdater
-
-
方法详细资料
-
isInited
public boolean isInited() -
init
public void init()Create a ScheduledExecutorService to remove unused DataSources. -
destroy
public void destroy() -
update
Process the given NodeEvent[]. Maybe add / delete some nodes. -
removeDataSources
public void removeDataSources()Remove unused DataSources. -
addNode
-
deleteNode
-
getHighAvailableDataSource
-
setHighAvailableDataSource
-
getNodesToDel
-
getIntervalSeconds
public int getIntervalSeconds() -
setIntervalSeconds
public void setIntervalSeconds(int intervalSeconds) -
isAllowEmptyPool
public boolean isAllowEmptyPool() -
setAllowEmptyPool
public void setAllowEmptyPool(boolean allowEmptyPool)
-