Package org.infinispan.server.hotrod
Enum HotRodVersion
- java.lang.Object
-
- java.lang.Enum<HotRodVersion>
-
- org.infinispan.server.hotrod.HotRodVersion
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<HotRodVersion>
public enum HotRodVersion extends java.lang.Enum<HotRodVersion>
The various Hot Rod versions- Since:
- 9.2
- Author:
- Tristan Tarrant
-
-
Field Summary
Fields Modifier and Type Field Description static HotRodVersion
LATEST
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static HotRodVersion
forVersion(byte version)
static VersionedEncoder
getEncoder(byte version)
byte
getVersion()
boolean
isAtLeast(byte version)
Checks whether the supplied version is equal or greater than the version represented by this objectboolean
isOlder(byte version)
Checks whether the supplied version is older than the version represented by this objectjava.lang.String
toString()
static HotRodVersion
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static HotRodVersion[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
UNKNOWN
public static final HotRodVersion UNKNOWN
-
HOTROD_20
public static final HotRodVersion HOTROD_20
-
HOTROD_21
public static final HotRodVersion HOTROD_21
-
HOTROD_22
public static final HotRodVersion HOTROD_22
-
HOTROD_23
public static final HotRodVersion HOTROD_23
-
HOTROD_24
public static final HotRodVersion HOTROD_24
-
HOTROD_25
public static final HotRodVersion HOTROD_25
-
HOTROD_26
public static final HotRodVersion HOTROD_26
-
HOTROD_27
public static final HotRodVersion HOTROD_27
-
HOTROD_28
public static final HotRodVersion HOTROD_28
-
HOTROD_29
public static final HotRodVersion HOTROD_29
-
HOTROD_30
public static final HotRodVersion HOTROD_30
-
-
Field Detail
-
LATEST
public static final HotRodVersion LATEST
-
-
Method Detail
-
values
public static HotRodVersion[] 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 (HotRodVersion c : HotRodVersion.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static HotRodVersion valueOf(java.lang.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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
getVersion
public byte getVersion()
-
isOlder
public boolean isOlder(byte version)
Checks whether the supplied version is older than the version represented by this object- Parameters:
version
- a Hot Rod version in its wire representation- Returns:
- true if version is older than this
-
isAtLeast
public boolean isAtLeast(byte version)
Checks whether the supplied version is equal or greater than the version represented by this object- Parameters:
version
- a Hot Rod version in its wire representation- Returns:
- true if version is equal or greater than this
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Enum<HotRodVersion>
-
forVersion
public static HotRodVersion forVersion(byte version)
-
getEncoder
public static VersionedEncoder getEncoder(byte version)
-
-