Enum Class UnsignedOptions.Behavior
java.lang.Object
java.lang.Enum<UnsignedOptions.Behavior>
org.apache.beam.sdk.extensions.sbe.UnsignedOptions.Behavior
- All Implemented Interfaces:
Serializable
,Comparable<UnsignedOptions.Behavior>
,Constable
- Enclosing class:
UnsignedOptions
Defines the exact behavior for unsigned types.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionConverts the unsigned value to aBigDecimal
value.Converts the unsigned value to a string representation.Uses the signed primitive with the next higher bit count.Uses the signed primitive with the same bit count. -
Method Summary
Modifier and TypeMethodDescriptionstatic UnsignedOptions.Behavior
Returns the enum constant of this class with the specified name.static UnsignedOptions.Behavior[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
SAME_BIT_SIGNED
Uses the signed primitive with the same bit count.If this option is chosen, unsigned types may appear to have negative values when printing or doing math.
This option is compatible with all types.
-
HIGHER_BIT_SIGNED
Uses the signed primitive with the next higher bit count.If this option is chosen, then all unsigned fields will consume twice as much of the available memory and networking bandwidth.
This option is incompatible with unsigned 64-bit types. Another option must be chosen for that use case. If provided for 64-bit, then an exception will be thrown.
-
CONVERT_TO_STRING
Converts the unsigned value to a string representation.This will be represented by a
Schema.FieldType.STRING
in the schema.This option is compatible with all types.
-
CONVERT_TO_BIG_DECIMAL
Converts the unsigned value to aBigDecimal
value.This will be represented by a
Schema.FieldType.DECIMAL
in the schema.this option is compatible with all types.
-
-
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
-