Avro C#
|
A general purpose reader of data from avro streams. This reader analyzes and resolves the reader and writer schemas when constructed so that reads can be more efficient. Once constructed, a reader can be reused or shared among threads to avoid incurring more resolution costs. More...
Classes | |
interface | ArrayAccess |
Defines the interface for a class that provides access to an array implementation. More... | |
interface | EnumAccess |
Defines the interface for a class that provides access to an enum implementation. More... | |
interface | FixedAccess |
Defines the interface for a class that provides access to a fixed implementation. More... | |
interface | MapAccess |
Defines the interface for a class that provides access to a map implementation. More... | |
interface | RecordAccess |
Defines the interface for a class that provides access to a record implementation. More... | |
Public Member Functions | |
T | Read (T reuse, Decoder decoder) |
Read a datum. Traverse the schema, depth-first, reading all leaf values in the schema into a datum that is returned. If the provided datum is non-null it may be reused and returned. | |
Protected Member Functions | |
delegate object | ReadItem (object reuse, Decoder dec) |
Defines the signature for a function that reads an item from a decoder. More... | |
PreresolvingDatumReader (Schema writerSchema, Schema readerSchema) | |
Initializes a new instance of the PreresolvingDatumReader<T> class. More... | |
abstract ArrayAccess | GetArrayAccess (ArraySchema readerSchema) |
Returns an ArrayAccess implementation for the given schema. More... | |
abstract EnumAccess | GetEnumAccess (EnumSchema readerSchema) |
Returns an EnumAccess implementation for the given schema. More... | |
abstract MapAccess | GetMapAccess (MapSchema readerSchema) |
Returns a MapAccess implementation for the given schema. More... | |
abstract RecordAccess | GetRecordAccess (RecordSchema readerSchema) |
Returns a RecordAccess implementation for the given schema. More... | |
abstract FixedAccess | GetFixedAccess (FixedSchema readerSchema) |
Returns a FixedAccess implementation for the given schema. More... | |
virtual bool | IsReusable (Schema.Type tag) |
Indicates if it's possible to reuse an object of the specified type. Generally false for immutable objects like int, long, string, etc but may differ between the Specific and Generic implementations. Used to avoid retrieving the existing value if it's not reusable. More... | |
Static Protected Member Functions | |
static Schema | FindBranch (UnionSchema us, Schema s) |
Finds the branch of the union schema associated with the given schema. More... | |
Properties | |
Schema | ReaderSchema [get] |
Schema | WriterSchema [get] |
![]() | |
Schema | ReaderSchema [get] |
Schema used to read the data. More... | |
Schema | WriterSchema [get] |
Schema that was used to write the data. More... | |
A general purpose reader of data from avro streams. This reader analyzes and resolves the reader and writer schemas when constructed so that reads can be more efficient. Once constructed, a reader can be reused or shared among threads to avoid incurring more resolution costs.
|
inlineprotected |
Initializes a new instance of the PreresolvingDatumReader<T> class.
|
inlinestaticprotected |
|
protectedpure virtual |
Returns an ArrayAccess implementation for the given schema.
readerSchema | Schema for the array. |
Implemented in Avro.Specific.SpecificDatumReader< T >, and Avro.Generic.GenericDatumReader< T >.
|
protectedpure virtual |
Returns an EnumAccess implementation for the given schema.
readerSchema | Schema for the enum. |
Implemented in Avro.Specific.SpecificDatumReader< T >, and Avro.Generic.GenericDatumReader< T >.
|
protectedpure virtual |
Returns a FixedAccess implementation for the given schema.
readerSchema | Schema for the fixed. |
Implemented in Avro.Specific.SpecificDatumReader< T >, and Avro.Generic.GenericDatumReader< T >.
|
protectedpure virtual |
Returns a MapAccess implementation for the given schema.
readerSchema | Schema for the map. |
Implemented in Avro.Specific.SpecificDatumReader< T >, and Avro.Generic.GenericDatumReader< T >.
|
protectedpure virtual |
Returns a RecordAccess implementation for the given schema.
readerSchema | Schema for the record. |
Implemented in Avro.Specific.SpecificDatumReader< T >, and Avro.Generic.GenericDatumReader< T >.
|
inlineprotectedvirtual |
Indicates if it's possible to reuse an object of the specified type. Generally false for immutable objects like int, long, string, etc but may differ between the Specific and Generic implementations. Used to avoid retrieving the existing value if it's not reusable.
tag | Schema type to test for reusability. |
Reimplemented in Avro.Specific.SpecificDatumReader< T >, and Avro.Generic.GenericDatumReader< T >.
|
protected |
Defines the signature for a function that reads an item from a decoder.
reuse | Optional object to deserialize the datum into. May be null. |
dec | Decoder to read data from. |