Package com.bakdata.kafka
Class ErrorDescription
- java.lang.Object
-
- org.apache.avro.specific.SpecificRecordBase
-
- com.bakdata.kafka.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 classErrorDescription.BuilderRecordBuilder for ErrorDescription instances.
-
Field Summary
Fields Modifier and Type Field Description static org.apache.avro.SchemaSCHEMA$
-
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 specifiedSchemaStore.voidcustomDecode(org.apache.avro.io.ResolvingDecoder in)voidcustomEncode(org.apache.avro.io.Encoder out)static ErrorDescriptionfromByteBuffer(java.nio.ByteBuffer b)Deserializes a ErrorDescription from a ByteBuffer.java.lang.Objectget(int field$)static org.apache.avro.SchemagetClassSchema()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.SchemagetSchema()org.apache.avro.specific.SpecificDatagetSpecificData()java.util.Optional<java.lang.String>getStackTrace()Gets the value of the 'stack_trace' field as an Optional<java.lang.String>.protected booleanhasCustomCoders()static ErrorDescription.BuildernewBuilder()Creates a new ErrorDescription RecordBuilder.static ErrorDescription.BuildernewBuilder(ErrorDescription other)Creates a new ErrorDescription RecordBuilder by copying an existing ErrorDescription instance.static ErrorDescription.BuildernewBuilder(ErrorDescription.Builder other)Creates a new ErrorDescription RecordBuilder by copying an existing Builder.voidput(int field$, java.lang.Object value$)voidreadExternal(java.io.ObjectInput in)voidsetErrorClass(java.lang.String value)Sets the value of the 'error_class' field.voidsetMessage(java.lang.String value)Sets the value of the 'message' field.voidsetStackTrace(java.lang.String value)Sets the value of the 'stack_trace' field.java.nio.ByteBuffertoByteBuffer()Serializes this ErrorDescription to a ByteBuffer.voidwriteExternal(java.io.ObjectOutput out)-
Methods inherited from class org.apache.avro.specific.SpecificRecordBase
compareTo, equals, get, getConversion, getConversion, hashCode, put, toString
-
-
-
-
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 usenewBuilder().
-
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_classmessage- The new value for messagestack_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 specifiedSchemaStore.- Parameters:
resolver- aSchemaStoreused 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.IOExceptionSerializes 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:
getSpecificDatain classorg.apache.avro.specific.SpecificRecordBase
-
getSchema
public org.apache.avro.Schema getSchema()
- Specified by:
getSchemain interfaceorg.apache.avro.generic.GenericContainer- Specified by:
getSchemain classorg.apache.avro.specific.SpecificRecordBase
-
get
public java.lang.Object get(int field$)
- Specified by:
getin interfaceorg.apache.avro.generic.IndexedRecord- Specified by:
getin classorg.apache.avro.specific.SpecificRecordBase
-
put
public void put(int field$, java.lang.Object value$)- Specified by:
putin interfaceorg.apache.avro.generic.IndexedRecord- Specified by:
putin classorg.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:
writeExternalin interfacejava.io.Externalizable- Overrides:
writeExternalin classorg.apache.avro.specific.SpecificRecordBase- Throws:
java.io.IOException
-
readExternal
public void readExternal(java.io.ObjectInput in) throws java.io.IOException- Specified by:
readExternalin interfacejava.io.Externalizable- Overrides:
readExternalin classorg.apache.avro.specific.SpecificRecordBase- Throws:
java.io.IOException
-
hasCustomCoders
protected boolean hasCustomCoders()
- Overrides:
hasCustomCodersin classorg.apache.avro.specific.SpecificRecordBase
-
customEncode
public void customEncode(org.apache.avro.io.Encoder out) throws java.io.IOException- Overrides:
customEncodein classorg.apache.avro.specific.SpecificRecordBase- Throws:
java.io.IOException
-
customDecode
public void customDecode(org.apache.avro.io.ResolvingDecoder in) throws java.io.IOException- Overrides:
customDecodein classorg.apache.avro.specific.SpecificRecordBase- Throws:
java.io.IOException
-
-