public enum ProtocolVersion extends Enum<ProtocolVersion>
Modifier and Type | Field and Description |
---|---|
static ProtocolVersion |
NEWEST_BETA
The most recent beta protocol version supported by the driver.
|
static ProtocolVersion |
NEWEST_SUPPORTED
The most recent protocol version supported by the driver.
|
Modifier and Type | Method and Description |
---|---|
static ProtocolVersion |
fromInt(int i)
Returns the value matching an integer version.
|
ProtocolVersion |
getLowerSupported()
Returns the highest supported version that is lower than this version.
|
int |
toInt()
Returns the version as an integer.
|
static ProtocolVersion |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ProtocolVersion[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ProtocolVersion V1
public static final ProtocolVersion V2
public static final ProtocolVersion V3
public static final ProtocolVersion V4
public static final ProtocolVersion V5
public static final ProtocolVersion V6
public static final ProtocolVersion NEWEST_SUPPORTED
public static final ProtocolVersion NEWEST_BETA
public static ProtocolVersion[] values()
for (ProtocolVersion c : ProtocolVersion.values()) System.out.println(c);
public static ProtocolVersion valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic int toInt()
public ProtocolVersion getLowerSupported()
null
if
there isn't such a version.public static ProtocolVersion fromInt(int i)
i
- the version as an integer.IllegalArgumentException
- if the argument doesn't match any known version.Copyright © 2012–2023. All rights reserved.