Class UnsignedOptions
java.lang.Object
org.apache.beam.sdk.extensions.sbe.UnsignedOptions
- All Implemented Interfaces:
Serializable
Options for controlling what to do with unsigned types, specifically whether to use a higher bit
count or, in the case of uint64, a string.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
Defines the exact behavior for unsigned types.static class
Builder forUnsignedOptions
. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic UnsignedOptions.Builder
builder()
abstract UnsignedOptions.Builder
abstract UnsignedOptions.Behavior
abstract UnsignedOptions.Behavior
abstract UnsignedOptions.Behavior
abstract UnsignedOptions.Behavior
static UnsignedOptions
usingHigherBitSize
(UnsignedOptions.Behavior uint64Behavior) Returns options for using a higher bit count for unsigned types.static UnsignedOptions
Returns options for using the same bit size for all unsigned types.
-
Constructor Details
-
UnsignedOptions
public UnsignedOptions()
-
-
Method Details
-
uint8Behavior
-
uint16Behavior
-
uint32Behavior
-
uint64Behavior
-
usingSameBitSize
Returns options for using the same bit size for all unsigned types.This means that if an unsigned value from SBE comes in with a value outside the signed range, then the negative equivalent (in terms of bits) will be used.
-
usingHigherBitSize
Returns options for using a higher bit count for unsigned types.This means that if an unsigned value is encountered, it will always use the higher bit count, even if that higher bit count is unnecessary. However, this means that if it is necessary, then the proper value will be returned rather than the negative equivalent (in terms of bits).
The
uint64Behavior
controls the behavior of 64-bit values, since no properly higher-bit-numeric type exists. This cannot beUnsignedOptions.Behavior.HIGHER_BIT_SIGNED
or else an exception will be thrown. -
builder
-
toBuilder
-