Package org.apache.beam.sdk.coders
Class CustomCoder<T>
java.lang.Object
org.apache.beam.sdk.coders.Coder<T>
org.apache.beam.sdk.coders.CustomCoder<T>
- Type Parameters:
T- the type of values being encoded and decoded
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
AmqpMessageCoder,ApproximateDistinct.HyperLogLogPlusCoder,AvroCoder,CoGbkResult.CoGbkResultCoder,CountingSource.CounterMarkCoder,DelegateCoder,FhirSearchParameterCoder,HealthcareIOErrorCoder,HL7v2MessageCoder,HL7v2ReadResponseCoder,IsmFormat.IsmRecordCoder,JAXBCoder,JsonArrayCoder,ProtoCoder,PubsubMessagePayloadOnlyCoder,PubsubMessageWithAttributesAndMessageIdAndOrderingKeyCoder,PubsubMessageWithAttributesAndMessageIdCoder,PubsubMessageWithAttributesCoder,PubsubMessageWithMessageIdCoder,PubsubMessageWithTopicCoder,SchemaCoder,SequenceRangeAccumulator.SequenceRangeAccumulatorCoder,SerializableCoder,StringDelegateCoder,ThriftCoder,WritableCoder
An abstract base class that implements all methods of
Coder except Coder.encode(T, java.io.OutputStream)
and Coder.decode(java.io.InputStream).- 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 TypeMethodDescriptionvoidThrowCoder.NonDeterministicExceptionif the coding is not deterministic.Methods inherited from class org.apache.beam.sdk.coders.Coder
consistentWithEquals, decode, decode, encode, encode, getEncodedElementByteSize, getEncodedElementByteSizeUsingCoder, getEncodedTypeDescriptor, isRegisterByteSizeObserverCheap, registerByteSizeObserver, structuralValue, verifyDeterministic, verifyDeterministic
-
Constructor Details
-
CustomCoder
public CustomCoder()
-
-
Method Details
-
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..Returns an empty list. A
CustomCoderhas no default argumentcoders.- Specified by:
getCoderArgumentsin classCoder<T>
-
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.
- Specified by:
verifyDeterministicin classCoder<T>- Throws:
Coder.NonDeterministicException- aCustomCoderis presumed nondeterministic.
- two values that compare as equal (via
-