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