public class DiscoveryServiceLocator extends Object implements ServiceLocator
ServiceLocator that uses DruidNodeDiscovery.| Constructor and Description |
|---|
DiscoveryServiceLocator(DruidNodeDiscoveryProvider discoveryProvider,
NodeRole nodeRole) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
com.google.common.util.concurrent.ListenableFuture<ServiceLocations> |
locate()
Returns a future that resolves to a set of
ServiceLocation. |
void |
start() |
public DiscoveryServiceLocator(DruidNodeDiscoveryProvider discoveryProvider, NodeRole nodeRole)
public com.google.common.util.concurrent.ListenableFuture<ServiceLocations> locate()
ServiceLocatorServiceLocation.
If the returned object returns true from ServiceLocations.isClosed(), it means the service has closed
permanently. Otherwise, any of the returned locations in ServiceLocations.getLocations() is a viable
selection.
It is possible for the list of locations to be empty. This means that the service is not currently available,
but also has not been closed, so it may become available at some point in the future.locate in interface ServiceLocatorpublic void start()
public void close()
close in interface Closeableclose in interface AutoCloseableclose in interface ServiceLocatorCopyright © 2011–2023 The Apache Software Foundation. All rights reserved.