Enum ProtocolVersion
- java.lang.Object
-
- java.lang.Enum<ProtocolVersion>
-
- org.infinispan.hotrod.configuration.ProtocolVersion
-
- All Implemented Interfaces:
Serializable,Comparable<ProtocolVersion>
public enum ProtocolVersion extends Enum<ProtocolVersion>
Enumeration of supported Hot Rod client protocol VERSIONS.- Since:
- 14.0
-
-
Enum Constant Summary
Enum Constants Enum Constant Description PROTOCOL_VERSION_40PROTOCOL_VERSION_AUTO
-
Field Summary
Fields Modifier and Type Field Description static ProtocolVersionDEFAULT_PROTOCOL_VERSIONstatic ProtocolVersionHIGHEST_PROTOCOL_VERSION
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ProtocolVersiongetBestVersion(int version)intgetVersion()static ProtocolVersionparseVersion(String version)StringtoString()static ProtocolVersionvalueOf(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.
-
-
-
Enum Constant Detail
-
PROTOCOL_VERSION_40
public static final ProtocolVersion PROTOCOL_VERSION_40
-
PROTOCOL_VERSION_AUTO
public static final ProtocolVersion PROTOCOL_VERSION_AUTO
-
-
Field Detail
-
DEFAULT_PROTOCOL_VERSION
public static final ProtocolVersion DEFAULT_PROTOCOL_VERSION
-
HIGHEST_PROTOCOL_VERSION
public static final ProtocolVersion HIGHEST_PROTOCOL_VERSION
-
-
Method Detail
-
values
public static ProtocolVersion[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ProtocolVersion c : ProtocolVersion.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ProtocolVersion valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
toString
public String toString()
- Overrides:
toStringin classEnum<ProtocolVersion>
-
getVersion
public int getVersion()
-
parseVersion
public static ProtocolVersion parseVersion(String version)
-
getBestVersion
public static ProtocolVersion getBestVersion(int version)
-
-