DbEnv::cdsgroup_begin()

#include <db_cxx.h>
 
int
DbEnv::cdsgroup_begin(DbTxn **tid);

The DbEnv::cdsgroup_begin() method allocates a locker ID in an environment configured for Berkeley DB Concurrent Data Store applications. It copies a pointer to a DbTxn that uniquely identifies the locker ID into the memory to which tid refers. Calling the DbTxn::commit() method will discard the allocated locker ID.

See Berkeley DB Concurrent Data Store applications for more information about when this is required.

The DbEnv::cdsgroup_begin() method may be called at any time during the life of the application.

The DbEnv::cdsgroup_begin() method either returns a non-zero error value or throws an exception that encapsulates a non-zero error value on failure, and returns 0 on success.

Errors

The DbEnv::cdsgroup_begin() method may fail and throw a DbException exception, encapsulating one of the following non-zero errors, or return one of the following non-zero errors:

ENOMEM

The maximum number of lockers has been reached.

Class

DbEnv, DbTxn

See Also

Transaction Subsystem and Related Methods