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
,PulsarMessageCoder
,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 TypeMethodDescriptionvoid
ThrowCoder.NonDeterministicException
if 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 aCoder
for a parameterized type, returns the list ofCoder
s 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 thisCoder
does not encode/decode a parameterized type, returns the empty list..Returns an empty list. A
CustomCoder
has no default argumentcoders
.- Specified by:
getCoderArguments
in classCoder<T>
-
verifyDeterministic
ThrowCoder.NonDeterministicException
if the coding is not deterministic.In order for a
Coder
to 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
Coder
always 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:
verifyDeterministic
in classCoder<T>
- Throws:
Coder.NonDeterministicException
- aCustomCoder
is presumed nondeterministic.
- two values that compare as equal (via
-