Package org.apache.beam.sdk.coders
Class AtomicCoder<T>
java.lang.Object
org.apache.beam.sdk.coders.Coder<T>
org.apache.beam.sdk.coders.StructuredCoder<T>
org.apache.beam.sdk.coders.AtomicCoder<T>
- Type Parameters:
T- the type of the values being transcoded
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
AttributeValueCoder,BigDecimalCoder,BigEndianIntegerCoder,BigEndianLongCoder,BigEndianShortCoder,BigIntegerCoder,BigQueryInsertErrorCoder,BigQueryStorageApiInsertErrorCoder,BigtableWriteResultCoder,BitSetCoder,BooleanCoder,ByteArrayCoder,ByteCoder,ByteStringCoder,ByteStringCoder,DefaultFilenamePolicy.ParamsCoder,DoubleCoder,DurationCoder,ElasticsearchIO.DocumentCoder,EncodedBoundedWindow.Coder,FloatCoder,InstantCoder,IsmFormat.FooterCoder,IsmFormat.IsmShardCoder,IsmFormat.KeyPrefixCoder,MetadataCoder,MetadataCoderV2,OffsetByteRangeCoder,OffsetRange.Coder,PaneInfo.PaneInfoCoder,RandomAccessData.RandomAccessDataCoder,ResourceIdCoder,RowMutation.RowMutationCoder,SplunkEventCoder,StringUtf8Coder,SubscriptionPartitionCoder,TableDestinationCoder,TableDestinationCoderV2,TableDestinationCoderV3,TableRowJsonCoder,TextualIntegerCoder,UuidCoder,VarIntCoder,VoidCoder
A
Coder that has no component Coders or other configuration.
Unless the behavior is overridden, atomic coders are presumed to be deterministic.
All atomic coders of the same class are considered to be equal to each other. As a result, an
AtomicCoder should have no associated configuration (instance variables, etc).
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.beam.sdk.coders.Coder
Coder.Context, Coder.NonDeterministicException -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean.final inthashCode().voidThrowCoder.NonDeterministicExceptionif the coding is not deterministic.Methods inherited from class org.apache.beam.sdk.coders.StructuredCoder
toStringMethods inherited from class org.apache.beam.sdk.coders.Coder
consistentWithEquals, decode, decode, encode, encode, getEncodedElementByteSize, getEncodedElementByteSizeUsingCoder, getEncodedTypeDescriptor, isRegisterByteSizeObserverCheap, registerByteSizeObserver, structuralValue, verifyDeterministic, verifyDeterministic
-
Constructor Details
-
AtomicCoder
public AtomicCoder()
-
-
Method Details
-
verifyDeterministic
ThrowCoder.NonDeterministicExceptionif the coding is not deterministic.In order for a
Coderto be considered deterministic, the following must be true:- two values that compare as equal (via
Object.equals()orComparable.compareTo(), if supported) have the same encoding. - the
Coderalways produces a canonical encoding, which is the same for an instance of an object even if produced on different computers at different times.
Unless overridden, does not throw. An
AtomicCoderis presumed to be deterministic- Specified by:
verifyDeterministicin classCoder<T>- Throws:
Coder.NonDeterministicException- if overridden to indicate that this subclass ofAtomicCoderis not deterministic
- two values that compare as equal (via
-
getCoderArguments
If this is aCoderfor a parameterized type, returns the list ofCoders being used for each of the parameters in the same order they appear within the parameterized type's type signature. If this cannot be done, or thisCoderdoes not encode/decode a parameterized type, returns the empty list..- Specified by:
getCoderArgumentsin classCoder<T>- Returns:
- the empty list
-
getComponents
Returns the list ofCodersthat are components of thisCoder.The default components will be equal to the value returned by
Coder.getCoderArguments()..- Overrides:
getComponentsin classStructuredCoder<T>- Returns:
- the empty
List.
-
equals
.- Overrides:
equalsin classStructuredCoder<T>- Returns:
- true if the other object has the same class as this
AtomicCoder.
-
hashCode
public final int hashCode().- Overrides:
hashCodein classStructuredCoder<T>- Returns:
- the
hashCode()of theClassof thisAtomicCoder.
-