DbEnv::set_rep_transport |
#include <db_cxx.h>int DbEnv::set_rep_transport(int envid, int (*send)(DB_ENV *dbenv, const Dbt *control, const Dbt *rec, const DbLsn *lsnp, int envid, u_int32_t flags));
The DbEnv::set_rep_transport method initializes the communication infrastructure for a database environment participating in a replicated application.
The DbEnv::set_rep_transport method configures operations performed using the specified DbEnv handle, not all operations performed on the underlying database environment.
The DbEnv::set_rep_transport method may be called at any time during the life of the application.
The DbEnv::set_rep_transport 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.
The special identifier DB_EID_BROADCAST indicates that a message should be broadcast to every environment in the replication group. The application may use a true broadcast protocol or may send the message in sequence to each machine with which it is in communication. In both cases, the sending site should not be asked to process the message.
It may sometimes be useful to pass application-specific data to the send function; see Environment FAQ for a discussion on how to do this.
The send function should not call back down into Berkeley DB. The send function must return 0 on success and non-zero on failure. If the send function fails, the message being sent is necessary to maintain database integrity, and the local log is not configured for synchronous flushing, the local log will be flushed; otherwise, any error from the send function will be ignored.The DbEnv::set_rep_transport method may fail and throw DbException, encapsulating one of the following non-zero errors, or return one of the following non-zero errors:
Copyright (c) 1996-2003 Sleepycat Software, Inc. - All rights reserved.