Product Documentation

FairCom DB API for C

Previous Topic

Next Topic

ctdbGetBatchBufferSize

Return the size of the batch buffer.

DECLARATION

VRLEN ctdbDECL ctdbGetBatchBufferSize(CTHANDLE Handle)

DESCRIPTION

ctdbGetBatchBufferSize() returns the size of the batch buffer currently allocated (or -1 if the handle is not a record handle).

  • Handle [in] the record handle.

USE CASE

The CTBATCH_KEEPBUFFER mode of ctdbSetBatch can be used to preserve the batch buffer after the batch is finished and reuse it for another batch. ctdbGetBatchBufferSize() can be used to determine if the buffer has gotten too big. If so, ctdbReleaseBatchBuffer() releases the buffer and reallocates it on the next ctdbSetBatch request.

SEE ALSO

ctdbReleaseBatchBuffer(), ctdbSetBatch

TOCIndex