public abstract class AbstractDiscoveryClusterAddressProvider extends Object implements TarantoolClusterAddressProvider
| Constructor and Description |
|---|
AbstractDiscoveryClusterAddressProvider(TarantoolClusterDiscoveryConfig discoveryConfig) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
protected abstract Collection<TarantoolServerAddress> |
discoverAddresses() |
Collection<TarantoolServerAddress> |
getAddresses()
The collection of Tarantool server nodes which belong to the same cluster
|
protected TarantoolClusterDiscoveryConfig |
getDiscoveryConfig() |
protected ScheduledExecutorService |
getExecutorService() |
void |
setRefreshCallback(Runnable runnable)
Specify callback for refreshing connections to addresses.
|
protected void |
startDiscoveryTask() |
public AbstractDiscoveryClusterAddressProvider(TarantoolClusterDiscoveryConfig discoveryConfig)
protected void startDiscoveryTask()
throws TarantoolClientException
TarantoolClientExceptionprotected TarantoolClusterDiscoveryConfig getDiscoveryConfig()
protected ScheduledExecutorService getExecutorService()
protected abstract Collection<TarantoolServerAddress> discoverAddresses()
public Collection<TarantoolServerAddress> getAddresses()
TarantoolClusterAddressProvidergetAddresses in interface TarantoolClusterAddressProviderTarantoolServerAddresspublic void setRefreshCallback(Runnable runnable)
TarantoolClusterAddressProviderFor example: can be executed when provider detects changes in the list of server addresses.
setRefreshCallback in interface TarantoolClusterAddressProviderrunnable - callback for running refresh connectionspublic void close()
close in interface TarantoolClusterAddressProviderclose in interface AutoCloseableCopyright © 2025 Picodata. All rights reserved.