public class SplunkEventCoder extends AtomicCoder<SplunkEvent>
Coder
for SplunkEvent
objects.Coder.Context, Coder.NonDeterministicException
Constructor and Description |
---|
SplunkEventCoder() |
Modifier and Type | Method and Description |
---|---|
SplunkEvent |
decode(java.io.InputStream in)
Decodes a value of type
T from the given input stream in the given context. |
void |
encode(SplunkEvent value,
java.io.OutputStream out)
Encodes the given value of type
T onto the given output stream. |
static CoderProvider |
getCoderProvider() |
TypeDescriptor<SplunkEvent> |
getEncodedTypeDescriptor()
Returns the
TypeDescriptor for the type encoded. |
static SplunkEventCoder |
of() |
void |
verifyDeterministic()
Throw
Coder.NonDeterministicException if the coding is not deterministic. |
equals, getCoderArguments, getComponents, hashCode
toString
consistentWithEquals, decode, encode, getEncodedElementByteSize, isRegisterByteSizeObserverCheap, registerByteSizeObserver, structuralValue, verifyDeterministic, verifyDeterministic
public static SplunkEventCoder of()
public static CoderProvider getCoderProvider()
public void encode(SplunkEvent value, java.io.OutputStream out) throws java.io.IOException
Coder
T
onto the given output stream.encode
in class Coder<SplunkEvent>
java.io.IOException
- if writing to the OutputStream
fails for some reasonCoderException
- if the value could not be encoded for some reasonpublic SplunkEvent decode(java.io.InputStream in) throws CoderException, java.io.IOException
Coder
T
from the given input stream in the given context. Returns the
decoded value.decode
in class Coder<SplunkEvent>
CoderException
- if the value could not be decoded for some reasonjava.io.IOException
- if reading from the InputStream
fails for some reasonpublic TypeDescriptor<SplunkEvent> getEncodedTypeDescriptor()
Coder
TypeDescriptor
for the type encoded.getEncodedTypeDescriptor
in class Coder<SplunkEvent>
public void verifyDeterministic() throws Coder.NonDeterministicException
AtomicCoder
Coder.NonDeterministicException
if the coding is not deterministic.
In order for a Coder
to be considered deterministic, the following must be true:
Object.equals()
or Comparable.compareTo()
, if supported) have the same encoding.
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.
Unless overridden, does not throw. An AtomicCoder
is presumed to be deterministic
verifyDeterministic
in class AtomicCoder<SplunkEvent>
Coder.NonDeterministicException
- if this coder is not deterministic.