Class DeadLetter

  • All Implemented Interfaces:
    java.io.Externalizable, java.io.Serializable, java.lang.Comparable<org.apache.avro.specific.SpecificRecord>, org.apache.avro.generic.GenericContainer, org.apache.avro.generic.GenericRecord, org.apache.avro.generic.IndexedRecord, org.apache.avro.specific.SpecificRecord

    public class DeadLetter
    extends org.apache.avro.specific.SpecificRecordBase
    implements org.apache.avro.specific.SpecificRecord
    See Also:
    Serialized Form
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  DeadLetter.Builder
      RecordBuilder for DeadLetter instances.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static org.apache.avro.Schema SCHEMA$  
    • Constructor Summary

      Constructors 
      Constructor Description
      DeadLetter()
      Default constructor.
      DeadLetter​(java.lang.String input_value, java.lang.String topic, java.lang.Integer partition, java.lang.Long offset, java.lang.String description, ErrorDescription cause)
      All-args constructor.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static org.apache.avro.message.BinaryMessageDecoder<DeadLetter> createDecoder​(org.apache.avro.message.SchemaStore resolver)
      Create a new BinaryMessageDecoder instance for this class that uses the specified SchemaStore.
      void customDecode​(org.apache.avro.io.ResolvingDecoder in)  
      void customEncode​(org.apache.avro.io.Encoder out)  
      static DeadLetter fromByteBuffer​(java.nio.ByteBuffer b)
      Deserializes a DeadLetter from a ByteBuffer.
      java.lang.Object get​(int field$)  
      ErrorDescription getCause()
      Gets the value of the 'cause' field.
      static org.apache.avro.Schema getClassSchema()  
      static org.apache.avro.message.BinaryMessageDecoder<DeadLetter> getDecoder()
      Return the BinaryMessageDecoder instance used by this class.
      java.lang.String getDescription()
      Gets the value of the 'description' field.
      static org.apache.avro.message.BinaryMessageEncoder<DeadLetter> getEncoder()
      Return the BinaryMessageEncoder instance used by this class.
      java.util.Optional<java.lang.String> getInputValue()
      Gets the value of the 'input_value' field as an Optional<java.lang.String>.
      java.util.Optional<java.lang.Long> getOffset()
      Gets the value of the 'offset' field as an Optional<java.lang.Long>.
      java.util.Optional<java.lang.Integer> getPartition()
      Gets the value of the 'partition' field as an Optional<java.lang.Integer>.
      org.apache.avro.Schema getSchema()  
      org.apache.avro.specific.SpecificData getSpecificData()  
      java.util.Optional<java.lang.String> getTopic()
      Gets the value of the 'topic' field as an Optional<java.lang.String>.
      protected boolean hasCustomCoders()  
      static DeadLetter.Builder newBuilder()
      Creates a new DeadLetter RecordBuilder.
      static DeadLetter.Builder newBuilder​(DeadLetter other)
      Creates a new DeadLetter RecordBuilder by copying an existing DeadLetter instance.
      static DeadLetter.Builder newBuilder​(DeadLetter.Builder other)
      Creates a new DeadLetter RecordBuilder by copying an existing Builder.
      void put​(int field$, java.lang.Object value$)  
      void readExternal​(java.io.ObjectInput in)  
      void setCause​(ErrorDescription value)
      Sets the value of the 'cause' field.
      void setDescription​(java.lang.String value)
      Sets the value of the 'description' field.
      void setInputValue​(java.lang.String value)
      Sets the value of the 'input_value' field.
      void setOffset​(java.lang.Long value)
      Sets the value of the 'offset' field.
      void setPartition​(java.lang.Integer value)
      Sets the value of the 'partition' field.
      void setTopic​(java.lang.String value)
      Sets the value of the 'topic' field.
      java.nio.ByteBuffer toByteBuffer()
      Serializes this DeadLetter to a ByteBuffer.
      void writeExternal​(java.io.ObjectOutput out)  
      • Methods inherited from class org.apache.avro.specific.SpecificRecordBase

        compareTo, equals, get, getConversion, getConversion, hashCode, put, toString
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface org.apache.avro.generic.GenericRecord

        hasField
    • Field Detail

      • SCHEMA$

        public static final org.apache.avro.Schema SCHEMA$
    • Constructor Detail

      • DeadLetter

        public DeadLetter()
        Default constructor. Note that this does not initialize fields to their default values from the schema. If that is desired then one should use newBuilder().
      • DeadLetter

        public DeadLetter​(java.lang.String input_value,
                          java.lang.String topic,
                          java.lang.Integer partition,
                          java.lang.Long offset,
                          java.lang.String description,
                          ErrorDescription cause)
        All-args constructor.
        Parameters:
        input_value - The new value for input_value
        topic - The new value for topic
        partition - The new value for partition
        offset - The new value for offset
        description - The new value for description
        cause - The new value for cause
    • Method Detail

      • getClassSchema

        public static org.apache.avro.Schema getClassSchema()
      • getEncoder

        public static org.apache.avro.message.BinaryMessageEncoder<DeadLetter> getEncoder()
        Return the BinaryMessageEncoder instance used by this class.
        Returns:
        the message encoder used by this class
      • getDecoder

        public static org.apache.avro.message.BinaryMessageDecoder<DeadLetter> getDecoder()
        Return the BinaryMessageDecoder instance used by this class.
        Returns:
        the message decoder used by this class
      • createDecoder

        public static org.apache.avro.message.BinaryMessageDecoder<DeadLetter> createDecoder​(org.apache.avro.message.SchemaStore resolver)
        Create a new BinaryMessageDecoder instance for this class that uses the specified SchemaStore.
        Parameters:
        resolver - a SchemaStore used to find schemas by fingerprint
        Returns:
        a BinaryMessageDecoder instance for this class backed by the given SchemaStore
      • toByteBuffer

        public java.nio.ByteBuffer toByteBuffer()
                                         throws java.io.IOException
        Serializes this DeadLetter to a ByteBuffer.
        Returns:
        a buffer holding the serialized data for this instance
        Throws:
        java.io.IOException - if this instance could not be serialized
      • fromByteBuffer

        public static DeadLetter fromByteBuffer​(java.nio.ByteBuffer b)
                                         throws java.io.IOException
        Deserializes a DeadLetter from a ByteBuffer.
        Parameters:
        b - a byte buffer holding serialized data for an instance of this class
        Returns:
        a DeadLetter instance decoded from the given buffer
        Throws:
        java.io.IOException - if the given bytes could not be deserialized into an instance of this class
      • getSpecificData

        public org.apache.avro.specific.SpecificData getSpecificData()
        Overrides:
        getSpecificData in class org.apache.avro.specific.SpecificRecordBase
      • getSchema

        public org.apache.avro.Schema getSchema()
        Specified by:
        getSchema in interface org.apache.avro.generic.GenericContainer
        Specified by:
        getSchema in class org.apache.avro.specific.SpecificRecordBase
      • get

        public java.lang.Object get​(int field$)
        Specified by:
        get in interface org.apache.avro.generic.IndexedRecord
        Specified by:
        get in class org.apache.avro.specific.SpecificRecordBase
      • put

        public void put​(int field$,
                        java.lang.Object value$)
        Specified by:
        put in interface org.apache.avro.generic.IndexedRecord
        Specified by:
        put in class org.apache.avro.specific.SpecificRecordBase
      • getInputValue

        public java.util.Optional<java.lang.String> getInputValue()
        Gets the value of the 'input_value' field as an Optional<java.lang.String>.
        Returns:
        The value wrapped in an Optional<java.lang.String>.
      • setInputValue

        public void setInputValue​(java.lang.String value)
        Sets the value of the 'input_value' field.
        Parameters:
        value - the value to set.
      • getTopic

        public java.util.Optional<java.lang.String> getTopic()
        Gets the value of the 'topic' field as an Optional<java.lang.String>.
        Returns:
        The value wrapped in an Optional<java.lang.String>.
      • setTopic

        public void setTopic​(java.lang.String value)
        Sets the value of the 'topic' field.
        Parameters:
        value - the value to set.
      • getPartition

        public java.util.Optional<java.lang.Integer> getPartition()
        Gets the value of the 'partition' field as an Optional<java.lang.Integer>.
        Returns:
        The value wrapped in an Optional<java.lang.Integer>.
      • setPartition

        public void setPartition​(java.lang.Integer value)
        Sets the value of the 'partition' field.
        Parameters:
        value - the value to set.
      • getOffset

        public java.util.Optional<java.lang.Long> getOffset()
        Gets the value of the 'offset' field as an Optional<java.lang.Long>.
        Returns:
        The value wrapped in an Optional<java.lang.Long>.
      • setOffset

        public void setOffset​(java.lang.Long value)
        Sets the value of the 'offset' field.
        Parameters:
        value - the value to set.
      • getDescription

        public java.lang.String getDescription()
        Gets the value of the 'description' field.
        Returns:
        The value of the 'description' field.
      • setDescription

        public void setDescription​(java.lang.String value)
        Sets the value of the 'description' field.
        Parameters:
        value - the value to set.
      • getCause

        public ErrorDescription getCause()
        Gets the value of the 'cause' field.
        Returns:
        The value of the 'cause' field.
      • setCause

        public void setCause​(ErrorDescription value)
        Sets the value of the 'cause' field.
        Parameters:
        value - the value to set.
      • newBuilder

        public static DeadLetter.Builder newBuilder()
        Creates a new DeadLetter RecordBuilder.
        Returns:
        A new DeadLetter RecordBuilder
      • newBuilder

        public static DeadLetter.Builder newBuilder​(DeadLetter.Builder other)
        Creates a new DeadLetter RecordBuilder by copying an existing Builder.
        Parameters:
        other - The existing builder to copy.
        Returns:
        A new DeadLetter RecordBuilder
      • newBuilder

        public static DeadLetter.Builder newBuilder​(DeadLetter other)
        Creates a new DeadLetter RecordBuilder by copying an existing DeadLetter instance.
        Parameters:
        other - The existing instance to copy.
        Returns:
        A new DeadLetter RecordBuilder
      • writeExternal

        public void writeExternal​(java.io.ObjectOutput out)
                           throws java.io.IOException
        Specified by:
        writeExternal in interface java.io.Externalizable
        Overrides:
        writeExternal in class org.apache.avro.specific.SpecificRecordBase
        Throws:
        java.io.IOException
      • readExternal

        public void readExternal​(java.io.ObjectInput in)
                          throws java.io.IOException
        Specified by:
        readExternal in interface java.io.Externalizable
        Overrides:
        readExternal in class org.apache.avro.specific.SpecificRecordBase
        Throws:
        java.io.IOException
      • hasCustomCoders

        protected boolean hasCustomCoders()
        Overrides:
        hasCustomCoders in class org.apache.avro.specific.SpecificRecordBase
      • customEncode

        public void customEncode​(org.apache.avro.io.Encoder out)
                          throws java.io.IOException
        Overrides:
        customEncode in class org.apache.avro.specific.SpecificRecordBase
        Throws:
        java.io.IOException
      • customDecode

        public void customDecode​(org.apache.avro.io.ResolvingDecoder in)
                          throws java.io.IOException
        Overrides:
        customDecode in class org.apache.avro.specific.SpecificRecordBase
        Throws:
        java.io.IOException