Modifier and Type | Class and Description |
---|---|
private static class | AvroSchema.
Sub-class that does writer-to-reader conversion by using "resolving decoder" (by avro codec) on top of binary codec, exposing content using (reader) schema this instance was configured with. |
Modifier and Type | Field and Description |
---|---|
protected final AtomicReference | _reader
Lazily instantiated value reader for this schema. |
protected final Schema | _writerSchema
Schema that was used for writing the data to decode; for simple instance used for reading as well (reader schema). |
public static final String | TYPE_ID
Format type id used by Jackson components to refer to Avro Format. |
Access | Constructor and Description |
---|---|
public |
Modifier and Type | Method and Description |
---|---|
protected AvroStructureReader | |
private boolean | |
public boolean | equals(Object
the reference object with which to compare. o)Overrides java. Indicates whether some other object is "equal to" this one. |
public Schema | |
public AvroStructureReader | |
public String | getSchemaType()
Implements com. Method that can be used to get an identifier that can be used for diagnostics purposes, to indicate what kind of data format this schema is used for: typically it is a short name of format itself, but it can also contain additional information in cases where data format supports multiple types of schemas. |
public int | |
public String | |
public AvroSchema | withReaderSchema(AvroSchema
"Reader Schema" to use (in Avro terms): schema that specified how
reader wants to see the data; specifies part of translation needed along with this
schema (which would be "Writer Schema" in Avro terms). readerSchema)Method that will consider this schema instance (used as so-called "Writer Schema"), and specified "Reader Schema" instance, and will either construct a new schema with appropriate translations, to use for reading (if reader and writer schemas are not same); or, if schemas are the same, return `this`. |
public AvroSchema | withUnsafeReaderSchema(AvroSchema readerSchema)
Similar to |
_reader | back to summary |
---|---|
protected final AtomicReference<AvroStructureReader> _reader Lazily instantiated value reader for this schema. |
_writerSchema | back to summary |
---|---|
protected final Schema _writerSchema Schema that was used for writing the data to decode; for simple instance used for reading as well (reader schema). |
TYPE_ID | back to summary |
---|---|
public static final String TYPE_ID Format type id used by Jackson components to refer to Avro Format. |
AvroSchema | back to summary |
---|---|
public AvroSchema(Schema asch) |
_constructReader | back to summary |
---|---|
protected AvroStructureReader _constructReader() throws IOException |
_schemaNamesEqual | back to summary |
---|---|
private boolean _schemaNamesEqual(Schema w, Schema r) |
equals | back to summary |
---|---|
public boolean equals(Object o) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. |
getAvroSchema | back to summary |
---|---|
public Schema getAvroSchema() Accessor for "writer schema" contained in this instance. |
getReader | back to summary |
---|---|
public AvroStructureReader getReader() throws IOException |
getSchemaType | back to summary |
---|---|
public String getSchemaType() Implements com. Doc from com. Method that can be used to get an identifier that can be used for diagnostics purposes, to indicate what kind of data format this schema is used for: typically it is a short name of format itself, but it can also contain additional information in cases where data format supports multiple types of schemas. |
hashCode | back to summary |
---|---|
public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
|
toString | back to summary |
---|---|
public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- |
withReaderSchema | back to summary |
---|---|
public AvroSchema withReaderSchema(AvroSchema readerSchema) throws JsonProcessingException Method that will consider this schema instance (used as so-called "Writer Schema"), and specified "Reader Schema" instance, and will either construct a new schema with appropriate translations, to use for reading (if reader and writer schemas are not same); or, if schemas are the same, return `this`. Note that neither `this` instance nor `readerSchema` is ever modified: if an altered version is needed, a new schema object will be constructed. Note this is a relatively expensive operation due to validation (although significant
part of cost is deferred until the first call to
|
withUnsafeReaderSchema | back to summary |
---|---|
public AvroSchema withUnsafeReaderSchema(AvroSchema readerSchema) throws JsonProcessingException Similar to
|
Modifier and Type | Field and Description |
---|---|
private final Schema |
Modifier and Type | Method and Description |
---|---|
protected AvroStructureReader | |
public static AvroSchema. | |
public boolean | equals(Object
the reference object with which to compare. o)Overrides com. Indicates whether some other object is "equal to" this one. |
public int | hashCode()
Overrides com. Returns a hash code value for this object. |
public String | toString()
Overrides com. Returns a string representation of the object. |
_readerSchema | back to summary |
---|---|
private final Schema _readerSchema |
Resolving | back to summary |
---|---|
public Resolving(Schema writer, Schema reader) |
_constructReader | back to summary |
---|---|
protected AvroStructureReader _constructReader() throws IOException Overrides com.
|
create | back to summary |
---|---|
public static AvroSchema. |
equals | back to summary |
---|---|
public boolean equals(Object o) Overrides com. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. |
hashCode | back to summary |
---|---|
public int hashCode() Overrides com. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
|
toString | back to summary |
---|---|
public String toString() Overrides com. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- |