CL - public class NodeDiscoveryImpl extends java.lang.Object implements NodeDiscovery
ConnectionPool using
ConnectionPool.setHosts(java.util.Collection). Note that the host source / supplier is passed in as an argument.| Constructor and Description |
|---|
NodeDiscoveryImpl(java.lang.String name,
int interval,
com.google.common.base.Supplier<java.util.List<Host>> hostSupplier,
ConnectionPool<?> connectionPool) |
NodeDiscoveryImpl(java.lang.String name,
int interval,
com.google.common.base.Supplier<java.util.List<Host>> hostSupplier,
ConnectionPool<?> connectionPool,
java.util.concurrent.ScheduledExecutorService executor) |
| Modifier and Type | Method and Description |
|---|---|
long |
getErrorCount() |
java.lang.Exception |
getLastException() |
org.joda.time.DateTime |
getLastRefreshTime() |
java.lang.String |
getRawHostList() |
long |
getRefreshCount() |
void |
shutdown()
Stop the node discovery thread
|
void |
start()
Start the node discovery thread
|
public NodeDiscoveryImpl(java.lang.String name,
int interval,
com.google.common.base.Supplier<java.util.List<Host>> hostSupplier,
ConnectionPool<?> connectionPool)
public NodeDiscoveryImpl(java.lang.String name,
int interval,
com.google.common.base.Supplier<java.util.List<Host>> hostSupplier,
ConnectionPool<?> connectionPool,
java.util.concurrent.ScheduledExecutorService executor)
public void start()
NodeDiscoverystart in interface NodeDiscoverypublic void shutdown()
NodeDiscoveryshutdown in interface NodeDiscoverypublic org.joda.time.DateTime getLastRefreshTime()
getLastRefreshTime in interface NodeDiscoverypublic long getRefreshCount()
getRefreshCount in interface NodeDiscoverypublic java.lang.Exception getLastException()
getLastException in interface NodeDiscoverypublic long getErrorCount()
getErrorCount in interface NodeDiscoverypublic java.lang.String getRawHostList()
getRawHostList in interface NodeDiscovery