All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.tarantool.driver.core.connection.TarantoolConnectionManager Maven / Gradle / Ivy

Go to download

Tarantool Cartridge driver for Tarantool versions 1.10+ based on Netty framework

There is a newer version: 0.14.0
Show newest version
package io.tarantool.driver.core.connection;

import io.tarantool.driver.api.connection.TarantoolConnection;

import java.util.concurrent.CompletableFuture;

/**
 * Manages the Tarantool server connections lifecycle. Maintains multiple connections. Once a connection is lost,
 * a connection procedure is performed.
 *
 * @author Alexey Kuzin
 */
public interface TarantoolConnectionManager extends AutoCloseable {
    /**
     * Get an established connection according to the order provided by specified connection selection strategy. If the
     * connection procedure hasn't been performed yet, starts it.
     *
     * @return a future with next connection in order
     */
    CompletableFuture getConnection();

    /**
     * Starts the process of establishing lacking connections to each host
     *
     * @return returns true if the establishing process has been started, else false
     */
    boolean refresh();
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy