Kinetica   C#   API  Version 7.2.3.1
KineticaAdo.InsertBatchManager Class Reference

Manages bulk insert operations for the ADO.NET driver. More...

Inherits IAsyncDisposable, and IDisposable.

Public Member Functions

 InsertBatchManager (Kinetica kinetica, InsertBatchOptions? options=null)
 
async Task< bool > InsertAsync (string tableName, IList< string > columnNames, IList< object?> values, CancellationToken cancellationToken=default)
 Inserts a record into the specified table using batch processing. More...
 
async Task< int > InsertBatchAsync (string tableName, IList< string > columnNames, IList< IList< object?>> valuesList, CancellationToken cancellationToken=default)
 Inserts multiple records into the specified table using batch processing. More...
 
async Task< long > FlushTableAsync (string tableName, CancellationToken cancellationToken=default)
 Flushes all pending records for the specified table. More...
 
async Task< long > FlushAllAsync (CancellationToken cancellationToken=default)
 Flushes all pending records for all tables. More...
 
int GetPendingCount (string tableName)
 Gets the number of pending records for the specified table. More...
 
int GetTotalPendingCount ()
 Gets the total number of pending records across all tables. More...
 
void Dispose ()
 
async ValueTask DisposeAsync ()
 

Public Attributes

long TotalRecordsInserted => Interlocked.Read(ref _totalRecordsInserted)
 Gets the total number of records inserted across all tables. More...
 
long TotalBatchesFlushed => Interlocked.Read(ref _totalBatchesFlushed)
 Gets the total number of batches flushed across all tables. More...
 
long BufferedRecordCount => Interlocked.Read(ref _bufferedRecordCount)
 Gets the number of records currently buffered (not yet flushed). More...
 

Detailed Description

Manages bulk insert operations for the ADO.NET driver.

Uses BulkInserter<GenericRecord> for high-performance batch insertion with:

  • Multi-head ingest with shard key routing
  • Backpressure control
  • Snappy compression (via Kinetica client)

Definition at line 19 of file InsertBatchManager.cs.

Constructor & Destructor Documentation

◆ InsertBatchManager()

KineticaAdo.InsertBatchManager.InsertBatchManager ( Kinetica  kinetica,
InsertBatchOptions options = null 
)
inline

Definition at line 32 of file InsertBatchManager.cs.

Member Function Documentation

◆ Dispose()

void KineticaAdo.InsertBatchManager.Dispose ( )
inline

Definition at line 208 of file InsertBatchManager.cs.

◆ DisposeAsync()

async ValueTask KineticaAdo.InsertBatchManager.DisposeAsync ( )
inline

Definition at line 235 of file InsertBatchManager.cs.

◆ FlushAllAsync()

async Task<long> KineticaAdo.InsertBatchManager.FlushAllAsync ( CancellationToken  cancellationToken = default)
inline

Flushes all pending records for all tables.

Definition at line 118 of file InsertBatchManager.cs.

◆ FlushTableAsync()

async Task<long> KineticaAdo.InsertBatchManager.FlushTableAsync ( string  tableName,
CancellationToken  cancellationToken = default 
)
inline

Flushes all pending records for the specified table.

Definition at line 98 of file InsertBatchManager.cs.

◆ GetPendingCount()

int KineticaAdo.InsertBatchManager.GetPendingCount ( string  tableName)
inline

Gets the number of pending records for the specified table.

Definition at line 143 of file InsertBatchManager.cs.

◆ GetTotalPendingCount()

int KineticaAdo.InsertBatchManager.GetTotalPendingCount ( )
inline

Gets the total number of pending records across all tables.

Definition at line 155 of file InsertBatchManager.cs.

◆ InsertAsync()

async Task<bool> KineticaAdo.InsertBatchManager.InsertAsync ( string  tableName,
IList< string >  columnNames,
IList< object?>  values,
CancellationToken  cancellationToken = default 
)
inline

Inserts a record into the specified table using batch processing.

Definition at line 58 of file InsertBatchManager.cs.

◆ InsertBatchAsync()

async Task<int> KineticaAdo.InsertBatchManager.InsertBatchAsync ( string  tableName,
IList< string >  columnNames,
IList< IList< object?>>  valuesList,
CancellationToken  cancellationToken = default 
)
inline

Inserts multiple records into the specified table using batch processing.

Definition at line 76 of file InsertBatchManager.cs.

Member Data Documentation

◆ BufferedRecordCount

long KineticaAdo.InsertBatchManager.BufferedRecordCount => Interlocked.Read(ref _bufferedRecordCount)

Gets the number of records currently buffered (not yet flushed).

Definition at line 53 of file InsertBatchManager.cs.

◆ TotalBatchesFlushed

long KineticaAdo.InsertBatchManager.TotalBatchesFlushed => Interlocked.Read(ref _totalBatchesFlushed)

Gets the total number of batches flushed across all tables.

Definition at line 48 of file InsertBatchManager.cs.

◆ TotalRecordsInserted

long KineticaAdo.InsertBatchManager.TotalRecordsInserted => Interlocked.Read(ref _totalRecordsInserted)

Gets the total number of records inserted across all tables.

Definition at line 43 of file InsertBatchManager.cs.


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