Class ErrorDescription

  • 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 ErrorDescription
    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  ErrorDescription.Builder
      RecordBuilder for ErrorDescription instances.
    • Field Summary

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

      Constructors 
      Constructor Description
      ErrorDescription()
      Default constructor.
      ErrorDescription​(java.lang.String error_class, java.lang.String message, java.lang.String stack_trace)
      All-args constructor.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static org.apache.avro.message.BinaryMessageDecoder<ErrorDescription> 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 ErrorDescription fromByteBuffer​(java.nio.ByteBuffer b)
      Deserializes a ErrorDescription from a ByteBuffer.
      java.lang.Object get​(int field$)  
      static org.apache.avro.Schema getClassSchema()  
      static org.apache.avro.message.BinaryMessageDecoder<ErrorDescription> getDecoder()
      Return the BinaryMessageDecoder instance used by this class.
      static org.apache.avro.message.BinaryMessageEncoder<ErrorDescription> getEncoder()
      Return the BinaryMessageEncoder instance used by this class.
      java.util.Optional<java.lang.String> getErrorClass()
      Gets the value of the 'error_class' field as an Optional<java.lang.String>.
      java.util.Optional<java.lang.String> getMessage()
      Gets the value of the 'message' field as an Optional<java.lang.String>.
      org.apache.avro.Schema getSchema()  
      org.apache.avro.specific.SpecificData getSpecificData()  
      java.util.Optional<java.lang.String> getStackTrace()
      Gets the value of the 'stack_trace' field as an Optional<java.lang.String>.
      protected boolean hasCustomCoders()  
      static ErrorDescription.Builder newBuilder()
      Creates a new ErrorDescription RecordBuilder.
      static ErrorDescription.Builder newBuilder​(ErrorDescription other)
      Creates a new ErrorDescription RecordBuilder by copying an existing ErrorDescription instance.
      static ErrorDescription.Builder newBuilder​(ErrorDescription.Builder other)
      Creates a new ErrorDescription RecordBuilder by copying an existing Builder.
      void put​(int field$, java.lang.Object value$)  
      void readExternal​(java.io.ObjectInput in)  
      void setErrorClass​(java.lang.String value)
      Sets the value of the 'error_class' field.
      void setMessage​(java.lang.String value)
      Sets the value of the 'message' field.
      void setStackTrace​(java.lang.String value)
      Sets the value of the 'stack_trace' field.
      java.nio.ByteBuffer toByteBuffer()
      Serializes this ErrorDescription 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

      • ErrorDescription

        public ErrorDescription()
        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().
      • ErrorDescription

        public ErrorDescription​(java.lang.String error_class,
                                java.lang.String message,
                                java.lang.String stack_trace)
        All-args constructor.
        Parameters:
        error_class - The new value for error_class
        message - The new value for message
        stack_trace - The new value for stack_trace
    • Method Detail

      • getClassSchema

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

        public static org.apache.avro.message.BinaryMessageEncoder<ErrorDescription> 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<ErrorDescription> 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<ErrorDescription> 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 ErrorDescription 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 ErrorDescription fromByteBuffer​(java.nio.ByteBuffer b)
                                               throws java.io.IOException
        Deserializes a ErrorDescription from a ByteBuffer.
        Parameters:
        b - a byte buffer holding serialized data for an instance of this class
        Returns:
        a ErrorDescription 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
      • getErrorClass

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

        public void setErrorClass​(java.lang.String value)
        Sets the value of the 'error_class' field.
        Parameters:
        value - the value to set.
      • getMessage

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

        public void setMessage​(java.lang.String value)
        Sets the value of the 'message' field.
        Parameters:
        value - the value to set.
      • getStackTrace

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

        public void setStackTrace​(java.lang.String value)
        Sets the value of the 'stack_trace' field.
        Parameters:
        value - the value to set.
      • newBuilder

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

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

        public static ErrorDescription.Builder newBuilder​(ErrorDescription other)
        Creates a new ErrorDescription RecordBuilder by copying an existing ErrorDescription instance.
        Parameters:
        other - The existing instance to copy.
        Returns:
        A new ErrorDescription 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