Package org.apache.beam.sdk.coders
Class StructuredCoder<T>
java.lang.Object
org.apache.beam.sdk.coders.Coder<T>
org.apache.beam.sdk.coders.StructuredCoder<T>
- All Implemented Interfaces:
 Serializable
- Direct Known Subclasses:
 AtomicCoder,FailsafeValueInSingleWindow.Coder,FileBasedSink.FileResultCoder,GlobalWindow.Coder,IntervalWindow.IntervalWindowCoder,IsmFormat.MetadataKeyCoder,IterableLikeCoder,KafkaRecordCoder,KvCoder,LengthPrefixCoder,MapCoder,NullableCoder,OptionalCoder,PCollectionViews.ValueOrMetadataCoder,ProducerRecordCoder,ReadableFileCoder,ShardedKeyCoder,SingletonKeyedWorkItemCoder,SnappyCoder,SortedMapCoder,TestStream.TestStreamCoder,TimestampedValue.TimestampedValueCoder,TimestampPrefixingWindowCoder,TopicPartitionCoder,UnionCoder,ValueInSingleWindow.Coder,ValueWithRecordId.ValueWithRecordIdCoder,VarLongCoder,WindowedValues.WindowedValueCoder
An abstract base class to implement a 
Coder that defines equality, hashing, and printing
 via the class name and recursively using getComponents().
 A StructuredCoder should be defined purely in terms of its component coders, and
 contain no additional configuration.
 
To extend StructuredCoder, override the following methods as appropriate:
 
getComponents(): the default implementation returnsCoder.getCoderArguments().Coder.getEncodedElementByteSize(T)andCoder.isRegisterByteSizeObserverCheap(T): the default implementation encodes values to bytes and counts the bytes, which is considered expensive. The default element byte size observer uses the value returned byCoder.getEncodedElementByteSize(T).
- 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
Methods inherited from class org.apache.beam.sdk.coders.Coder
consistentWithEquals, decode, decode, encode, encode, getCoderArguments, getEncodedElementByteSize, getEncodedElementByteSizeUsingCoder, getEncodedTypeDescriptor, isRegisterByteSizeObserverCheap, registerByteSizeObserver, structuralValue, verifyDeterministic, verifyDeterministic, verifyDeterministic 
- 
Constructor Details
- 
StructuredCoder
protected StructuredCoder() 
 - 
 - 
Method Details
- 
getComponents
Returns the list ofCodersthat are components of thisCoder.The default components will be equal to the value returned by
Coder.getCoderArguments(). - 
equals
- Overrides:
 equalsin classObject- Returns:
 trueif the twoStructuredCoderinstances have the same class and equal components.
 - 
hashCode
public int hashCode() - 
toString
 
 -