Products Support Documentation Download
Database Replication Functions
Collaboration diagram for Database Replication Functions:

Functions

RDM_RETCODE rdm_dbReplicationSend (RDM_DB db, void *replicationBuffer, size_t bufferSize, size_t *pBytesWritten)
 Populate a buffer with all of the changes to an in-memory database. More...
 
RDM_RETCODE rdm_dbReplicationReceive (RDM_DB db, const void *replicationBuffer, size_t messageSize)
 Apply a replication buffer with changes to an in-memory database. More...
 

Detailed Description

Replication functions for the core database API. All the fuctions here are located in RDM DB Engine Library. Linker option:

    -lrdmrdm

Function Documentation

◆ rdm_dbReplicationReceive()

RDM_RETCODE rdm_dbReplicationReceive ( RDM_DB  db,
const void *  replicationBuffer,
size_t  messageSize 
)

#include <rdmdbapi.h>

Apply a replication buffer with changes to an in-memory database.

This function will apply a replication buffer containing changes to an in-memory database. The replication buffer is generated by rdm_dbReplicationSend.

Locking Requirements
None.
Return values
sOKAYNormal, successful return.
sTRUNCATEResult is truncated.
See also
rdm_rdmReplicationSend
Parameters
[in]dbAn allocated RDM_DB
[in]replicationBufferThe buffer to read the changes from
[in]messageSizeThe size of the message

◆ rdm_dbReplicationSend()

RDM_RETCODE rdm_dbReplicationSend ( RDM_DB  db,
void *  replicationBuffer,
size_t  bufferSize,
size_t *  pBytesWritten 
)

#include <rdmdbapi.h>

Populate a buffer with all of the changes to an in-memory database.

This function will populate a buffer with all of the changes to an in-memory database. The buffer can be used by rdm_dbReplicationReceive to apply the changes to another database.

Locking Requirements
Read lock on all tables
Return values
sOKAYNormal, successful return.
sTRUNCATEResult is truncated.
See also
rdm_rdmReplicationReceive
Parameters
[in]dbAn allocated RDM_DB
[in,out]replicationBufferThe buffer to write the changes to
[in]bufferSizeThe size of replicationBuffer
[out]pBytesWrittenThe number of bytes written into replicationBuffer