Class UnsignedOptions
- java.lang.Object
-
- org.apache.beam.sdk.extensions.sbe.UnsignedOptions
-
- All Implemented Interfaces:
java.io.Serializable
public abstract class UnsignedOptions extends java.lang.Object implements java.io.SerializableOptions 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:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classUnsignedOptions.BehaviorDefines the exact behavior for unsigned types.static classUnsignedOptions.BuilderBuilder forUnsignedOptions.
-
Constructor Summary
Constructors Constructor Description UnsignedOptions()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static UnsignedOptions.Builderbuilder()abstract UnsignedOptions.BuildertoBuilder()abstract UnsignedOptions.Behavioruint16Behavior()abstract UnsignedOptions.Behavioruint32Behavior()abstract UnsignedOptions.Behavioruint64Behavior()abstract UnsignedOptions.Behavioruint8Behavior()static UnsignedOptionsusingHigherBitSize(UnsignedOptions.Behavior uint64Behavior)Returns options for using a higher bit count for unsigned types.static UnsignedOptionsusingSameBitSize()Returns options for using the same bit size for all unsigned types.
-
-
-
Method Detail
-
uint8Behavior
public abstract UnsignedOptions.Behavior uint8Behavior()
-
uint16Behavior
public abstract UnsignedOptions.Behavior uint16Behavior()
-
uint32Behavior
public abstract UnsignedOptions.Behavior uint32Behavior()
-
uint64Behavior
public abstract UnsignedOptions.Behavior uint64Behavior()
-
usingSameBitSize
public static UnsignedOptions 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
public static UnsignedOptions usingHigherBitSize(UnsignedOptions.Behavior uint64Behavior)
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
uint64Behaviorcontrols the behavior of 64-bit values, since no properly higher-bit-numeric type exists. This cannot beUnsignedOptions.Behavior.HIGHER_BIT_SIGNEDor else an exception will be thrown.
-
builder
public static UnsignedOptions.Builder builder()
-
toBuilder
public abstract UnsignedOptions.Builder toBuilder()
-
-