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
TarantoolClientException
protected TarantoolClusterDiscoveryConfig getDiscoveryConfig()
protected ScheduledExecutorService getExecutorService()
protected abstract Collection<TarantoolServerAddress> discoverAddresses()
public Collection<TarantoolServerAddress> getAddresses()
TarantoolClusterAddressProvider
getAddresses
in interface TarantoolClusterAddressProvider
TarantoolServerAddress
public void setRefreshCallback(Runnable runnable)
TarantoolClusterAddressProvider
For example: can be executed when provider detects changes in the list of server addresses.
setRefreshCallback
in interface TarantoolClusterAddressProvider
runnable
- callback for running refresh connectionspublic void close()
close
in interface TarantoolClusterAddressProvider
close
in interface AutoCloseable
Copyright © 2025 Picodata. All rights reserved.