| 限定符和类型 | 字段和说明 |
|---|---|
static int |
DEFAULT_INTERVAL |
| 构造器和说明 |
|---|
PoolUpdater(HighAvailableDataSource highAvailableDataSource) |
| 限定符和类型 | 方法和说明 |
|---|---|
protected void |
addNode(NodeEvent event) |
protected void |
deleteNode(NodeEvent event) |
void |
destroy() |
HighAvailableDataSource |
getHighAvailableDataSource() |
int |
getIntervalSeconds() |
Set<String> |
getNodesToDel() |
void |
init()
Create a ScheduledExecutorService to remove unused DataSources.
|
boolean |
isAllowEmptyPool() |
void |
removeDataSources()
Remove unused DataSources.
|
void |
setAllowEmptyPool(boolean allowEmptyPool) |
void |
setHighAvailableDataSource(HighAvailableDataSource highAvailableDataSource) |
void |
setIntervalSeconds(int intervalSeconds) |
void |
update(Observable o,
Object arg)
Process the given NodeEvent[].
|
public static final int DEFAULT_INTERVAL
public PoolUpdater(HighAvailableDataSource highAvailableDataSource)
public void init()
public void destroy()
public void update(Observable o, Object arg)
public void removeDataSources()
protected void addNode(NodeEvent event)
protected void deleteNode(NodeEvent event)
public HighAvailableDataSource getHighAvailableDataSource()
public void setHighAvailableDataSource(HighAvailableDataSource highAvailableDataSource)
public int getIntervalSeconds()
public void setIntervalSeconds(int intervalSeconds)
public boolean isAllowEmptyPool()
public void setAllowEmptyPool(boolean allowEmptyPool)
Copyright © 2013–2023. All rights reserved.