public final class ServerVersion extends Object implements Comparable<ServerVersion>
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(ServerVersion version) |
static ServerVersion |
create(int major,
int minor,
int patch)
Create a
ServerVersion that value is major.minor.patch. |
boolean |
equals(Object o) |
int |
getMajor() |
int |
getMinor() |
int |
getPatch() |
int |
hashCode() |
boolean |
isEnterprise()
Checks if the version is enterprise edition.
|
boolean |
isGreaterThanOrEqualTo(ServerVersion version)
Returns whether the current
ServerVersion is greater than or equal to the given one. |
boolean |
isLessThan(ServerVersion version)
Returns whether the current
ServerVersion is less than given one. |
static ServerVersion |
parse(String version)
Parse a
ServerVersion from String. |
String |
toString() |
public boolean isGreaterThanOrEqualTo(ServerVersion version)
ServerVersion is greater than or equal to the given one.version - the give one.version.public boolean isLessThan(ServerVersion version)
ServerVersion is less than given one.version - the give oneversion.public int compareTo(ServerVersion version)
compareTo in interface Comparable<ServerVersion>public int getMajor()
public int getMinor()
public int getPatch()
public boolean isEnterprise()
Notice: it is unstable API, should not be used outer than r2dbc-mysql.
public static ServerVersion parse(String version)
ServerVersion from String.version - origin version string.ServerVersion that value decode from version.IllegalArgumentException - if version is null, or any version part overflow.public static ServerVersion create(int major, int minor, int patch)
ServerVersion that value is major.minor.patch.major - must not be a negative integerminor - must not be a negative integerpatch - must not be a negative integerIllegalArgumentException - if any version part is negative integer.Copyright © 2018–2023 asyncer.io. All rights reserved.