io.tarantool.driver.ConnectionSelectionStrategy 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;
import io.tarantool.driver.core.TarantoolConnection;
import io.tarantool.driver.exceptions.NoAvailableConnectionsException;
/**
* Implementations of this class contain an algorithm and maintain the necessary state for selecting
* the next available connection from the supplied set of connections
*
* @author Sergey Volgin
* @author Alexey Kuzin
*/
public interface ConnectionSelectionStrategy {
/**
* Provide the next available connection from the underlying pool of connections
* @return an established connection
* @throws NoAvailableConnectionsException if no connections exist or all connections are not usable
*/
TarantoolConnection next() throws NoAvailableConnectionsException;
}