org.tarantool.SocketChannelProvider Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of connector Show documentation
Show all versions of connector Show documentation
Tarantool client for java
package org.tarantool;
import java.nio.channels.SocketChannel;
public interface SocketChannelProvider {
/**
* Provides socket channel to init restore connection.
* You could change hosts on fail and sleep between retries in this method
* @param retryNumber number of current retry. Reset after successful connect.
* @param lastError the last error occurs when reconnecting
* @return the result of SocketChannel open(SocketAddress remote) call
*/
SocketChannel get(int retryNumber, Throwable lastError);
}