Enum UnsignedOptions.Behavior
- java.lang.Object
-
- java.lang.Enum<UnsignedOptions.Behavior>
-
- org.apache.beam.sdk.extensions.sbe.UnsignedOptions.Behavior
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<UnsignedOptions.Behavior>
- Enclosing class:
- UnsignedOptions
public static enum UnsignedOptions.Behavior extends java.lang.Enum<UnsignedOptions.Behavior>
Defines the exact behavior for unsigned types.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CONVERT_TO_BIG_DECIMALConverts the unsigned value to aBigDecimalvalue.CONVERT_TO_STRINGConverts the unsigned value to a string representation.HIGHER_BIT_SIGNEDUses the signed primitive with the next higher bit count.SAME_BIT_SIGNEDUses the signed primitive with the same bit count.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static UnsignedOptions.BehaviorvalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static UnsignedOptions.Behavior[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
SAME_BIT_SIGNED
public static final UnsignedOptions.Behavior 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
public static final UnsignedOptions.Behavior 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
public static final UnsignedOptions.Behavior CONVERT_TO_STRING
Converts the unsigned value to a string representation.This will be represented by a
Schema.FieldType.STRINGin the schema.This option is compatible with all types.
-
CONVERT_TO_BIG_DECIMAL
public static final UnsignedOptions.Behavior CONVERT_TO_BIG_DECIMAL
Converts the unsigned value to aBigDecimalvalue.This will be represented by a
Schema.FieldType.DECIMALin the schema.this option is compatible with all types.
-
-
Method Detail
-
values
public static UnsignedOptions.Behavior[] 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 (UnsignedOptions.Behavior c : UnsignedOptions.Behavior.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static UnsignedOptions.Behavior 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
-
-