io.tarantool.driver.api.TarantoolClusterAddressProvider Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cartridge-driver Show documentation
Show all versions of cartridge-driver Show documentation
Tarantool Cartridge driver for Tarantool versions 1.10+ based on Netty framework
package io.tarantool.driver.api;
import java.util.Collection;
/**
* Provides a collection of Tarantool server addresses corresponding to the cluster nodes
*
* @author Alexey Kuzin
* @author Sergey Volgin
*/
public interface TarantoolClusterAddressProvider extends AutoCloseable {
/**
* The collection of Tarantool server nodes which belong to the same cluster
*
* @return collection of {@link TarantoolServerAddress}
*/
Collection getAddresses();
/**
* Specify callback for refreshing connections to addresses.
*
* For example: can be executed when provider detects changes in the list of server addresses.
*
* @param runnable callback for running refresh connections
*/
default void setRefreshCallback(Runnable runnable) {
}
@Override
default void close() {
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy