Package oracle.kv
Class KVVersion
java.lang.Object
oracle.kv.KVVersion
- All Implemented Interfaces:
Serializable,Comparable<KVVersion>
Oracle NoSQL DB version information. Versions consist of major, minor and
patch numbers.
There is one KVVersion object per running JVM and it may be accessed
using the static field CURRENT_VERSION.
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidassertVersionCheckDeprecation(KVVersion checkedVersion, String incompatibilityNote, String howToDeprecate) Asserts that a version check should be removed when certain version falls outside of the prerequisite range.intbooleanintgetMajor()Major number of the release version.intgetMinor()Minor number of the release version.The numeric version string without the release properties.getNumericVersionString(boolean withPatch) The numeric version string without the release properties, with or without the patch number.intOracle Major number of the release version.intOracle Minor number of the release version.intgetPatch()Patch number of the release version.Returns the release date for the release version, or null if not known.Returns the name of the edition of the release version, or null if not known.Returns the internal release ID for the release version, or null if not known.Release version, suitable for display.inthashCode()static voidstatic KVVersionparseVersion(String versionString) Returns a KVVersion object representing the specified version string without the release ID, release date,and name parts filled in.voidsetReleaseId(String releaseId) toString()
-
Field Details
-
CURRENT_VERSION
The current software version. -
PREREQUISITE_VERSION
The current prerequisite version. Nodes can only join the cluster if they are running at least this version of the software. See note in SerialVersion.java about how to manage prerequisite version, compatibility, and dead code that occurs when the prerequisite moves.
-
-
Constructor Details
-
KVVersion
-
KVVersion
public KVVersion(int oracleMajor, int oracleMinor, int majorNum, int minorNum, int patchNum, String name)
-
-
Method Details
-
main
-
toString
-
getOracleMajor
public int getOracleMajor()Oracle Major number of the release version.- Returns:
- The Oracle major number of the release version.
-
getOracleMinor
public int getOracleMinor()Oracle Minor number of the release version.- Returns:
- The Oracle minor number of the release version.
-
getMajor
public int getMajor()Major number of the release version.- Returns:
- The major number of the release version.
-
getMinor
public int getMinor()Minor number of the release version.- Returns:
- The minor number of the release version.
-
getPatch
public int getPatch()Patch number of the release version.- Returns:
- The patch number of the release version.
-
getReleaseId
Returns the internal release ID for the release version, or null if not known.- Returns:
- the release ID or null
-
getReleaseDate
Returns the release date for the release version, or null if not known.- Returns:
- the release date or null
-
getReleaseEdition
Returns the name of the edition of the release version, or null if not known.- Returns:
- the release edition or null
-
getNumericVersionString
The numeric version string without the release properties.- Returns:
- The release version
-
getNumericVersionString
The numeric version string without the release properties, with or without the patch number.- Returns:
- The release version
-
getVersionString
Release version, suitable for display.- Returns:
- The release version, suitable for display.
-
parseVersion
Returns a KVVersion object representing the specified version string without the release ID, release date,and name parts filled in. This method is basically the inverse ofgetNumericVersionString(). This method will also parse a full version string (returned from toString()) but only the numeric version portion of the string.- Parameters:
versionString- version string to parse- Returns:
- a KVVersion object
-
setReleaseId
-
compareTo
- Specified by:
compareToin interfaceComparable<KVVersion>
-
equals
-
hashCode
public int hashCode() -
assertVersionCheckDeprecation
public static void assertVersionCheckDeprecation(KVVersion checkedVersion, String incompatibilityNote, String howToDeprecate) Asserts that a version check should be removed when certain version falls outside of the prerequisite range.- Parameters:
checkedVersion- the version compared toPREREQUISITE_VERSIONwhich triggers anAssertionErrorif the comparison result is less than zero.incompatibilityNote- which documents the incompatibility problem for adding the check including the cause of the incompatibility and why the check can be removedhowToDeprecate- which documents how to remove the deprecated version check- See Also:
-
for more detail
-