Kinetica   C#   API  Version 7.2.3.1
GenericRecordEncoder Class Reference

High-performance Avro encoder for GenericRecord instances. More...

Public Member Functions

byte [] Encode (GenericRecord record)
 Encodes a single GenericRecord to Avro binary format. More...
 
byte [][] EncodeMany (IReadOnlyList< GenericRecord > records)
 Encodes multiple GenericRecords in parallel using thread-local buffers. More...
 
List< byte[]> EncodeManyAsList (IReadOnlyList< GenericRecord > records)
 Encodes multiple GenericRecords to a list of byte arrays. More...
 

Static Public Member Functions

static GenericRecordEncoder GetOrCreate (KineticaType ktype)
 Gets or creates a GenericRecordEncoder for the specified KineticaType. More...
 

Detailed Description

High-performance Avro encoder for GenericRecord instances.

This encoder reads values directly from GenericRecord's RecordValue[] array and writes Avro binary format without intermediate object allocations.

Definition at line 18 of file GenericRecordEncoder.cs.

Member Function Documentation

◆ Encode()

byte [] GenericRecordEncoder.Encode ( GenericRecord  record)
inline

Encodes a single GenericRecord to Avro binary format.

Definition at line 95 of file GenericRecordEncoder.cs.

◆ EncodeMany()

byte [][] GenericRecordEncoder.EncodeMany ( IReadOnlyList< GenericRecord records)
inline

Encodes multiple GenericRecords in parallel using thread-local buffers.

Definition at line 139 of file GenericRecordEncoder.cs.

◆ EncodeManyAsList()

List<byte[]> GenericRecordEncoder.EncodeManyAsList ( IReadOnlyList< GenericRecord records)
inline

Encodes multiple GenericRecords to a list of byte arrays.

Uses parallel encoding for batches of 100+ records.

Definition at line 169 of file GenericRecordEncoder.cs.

◆ GetOrCreate()

static GenericRecordEncoder GenericRecordEncoder.GetOrCreate ( KineticaType  ktype)
inlinestatic

Gets or creates a GenericRecordEncoder for the specified KineticaType.

Definition at line 35 of file GenericRecordEncoder.cs.


The documentation for this class was generated from the following file: