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

io.tarantool.driver.TarantoolVersionHolder 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;

/**
 * Aware of detecting Tarantool versions in the passed source. Stores the version for further use.
 *
 * @author Alexey Kuzin
 */
public class TarantoolVersionHolder {

    private TarantoolVersion tarantoolVersion;

    /**
     * Reads Tarantool version from a {@code String}. The version may be later retrieved using {@link #getVersion()}
     *
     * @param versionString string containing the Tarantool version
     * @throws InvalidVersionException if the version is invalid or unsupported
     */
    public void readVersion(String versionString) throws InvalidVersionException {
        tarantoolVersion = TarantoolVersion.fromString(versionString);
    }

    /**
     * Get Tarantool server version
     *
     * @return an instance of {@link TarantoolVersion}
     */
    public TarantoolVersion getVersion() {
        return tarantoolVersion;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy