Enum Class IndexSerializer
- All Implemented Interfaces:
Serializable,Comparable<IndexSerializer>,Constable,IntSerializer
Various strategies for marshalling an array/collection index (i.e. an unsigned integer).
- Author:
- Paul Ferraro
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionReads/write an unsigned integer using a variable-length format. -
Method Summary
Modifier and TypeMethodDescriptionstatic IntSerializerselect(int size) Returns the most efficient externalizer for a given index size.static IndexSerializerReturns the enum constant of this class with the specified name.static IndexSerializer[]values()Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOfMethods inherited from interface org.wildfly.clustering.marshalling.IntSerializer
readInt, size, writeInt
-
Enum Constant Details
-
UNSIGNED_BYTE
-
UNSIGNED_SHORT
-
INTEGER
-
VARIABLE
Reads/write an unsigned integer using a variable-length format. Format requires between 1 and 5 bytes, depending on the index size. Smaller values require fewer bytes. Logic lifted directly from org.infinispan.commons.io.UnsignedNumeric.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException- if the argument is null
-
select
Returns the most efficient externalizer for a given index size.- Parameters:
size- the size of the index- Returns:
- an index externalizer
-