Class BuildVersion
- java.lang.Object
-
- com.apple.foundationdb.relational.util.BuildVersion
-
@API(EXPERIMENTAL) public final class BuildVersion extends java.lang.Object
Hosts the content of the version.properties file written by the build into a generated file 'versions.properties' in the fdb-relational-api module. Contents of file look like this: # Generated by fdb-relational-api build. name=fdb-relational-layer version=22.10.10.7be747b-SNAPSHOT gitHash=7be747b148b5089c4bf57cf3c87513a1ee1b1e2e branch=api url='https://github.com/FoundationDB/fdb-record-layer/' user=stack buildtime=2022-10-11T04:59:47.480946Z Below are accessors for the content and some utility methods to get major or minor parts of version string. Obtain the singleton instance by callinggetInstance()
}
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static BuildVersion
getInstance()
int
getMajorVersion()
Utility for returning major part ofgetVersion()
: e.g.int
getMajorVersion(java.lang.String version)
Utility for finding major part of passed version.int
getMinorVersion()
Utility for returning minor part ofgetVersion()
: e.g.int
getMinorVersion(java.lang.String version)
Utility for finding minor part of passed version.java.lang.String
getURL()
java.lang.String
getVersion()
-
-
-
Method Detail
-
getInstance
public static BuildVersion getInstance()
-
getURL
public java.lang.String getURL()
-
getVersion
public java.lang.String getVersion()
-
getMajorVersion
public int getMajorVersion() throws RelationalException
Utility for returning major part ofgetVersion()
: e.g. if version is 1.2.3, this method will return '1'.- Returns:
- major version.
- Throws:
RelationalException
-
getMajorVersion
public int getMajorVersion(java.lang.String version) throws RelationalException
Utility for finding major part of passed version.- Parameters:
version
- full version- Returns:
- major sub-version.
- Throws:
RelationalException
-
getMinorVersion
public int getMinorVersion() throws RelationalException
Utility for returning minor part ofgetVersion()
: e.g. if version is 1.2.3, this method will return '2'.- Returns:
- minor version.
- Throws:
RelationalException
-
getMinorVersion
public int getMinorVersion(java.lang.String version) throws RelationalException
Utility for finding minor part of passed version.- Parameters:
version
- full version- Returns:
- minor sub-version.
- Throws:
RelationalException
-
-