DB_ENV->rep_set_nsites |
#include <db.h>int DB_ENV->rep_set_nsites(DB_ENV *env, u_int32_t nsites);
int DB_ENV->rep_get_nsites(DB_ENV *env, u_int32_t *nsitesp);
The DB_ENV->rep_set_nsites method specifies the total number of sites in a replication group.
The DB_ENV->rep_set_nsites method is typically called by applications which use the Berkeley DB library "replication manager" support. (However, see also the DB_ENV->rep_elect man page, the description of the nsites parameter.)
The database environment's replication subsystem may also be configured using the environment's DB_CONFIG file. The syntax of the entry in that file is a single line with the string "rep_set_nsites", one or more whitespace characters, and the number of sites specified. For example, "rep_set_nsites 5" sets the number of sites to 5. Because the DB_CONFIG file is read when the database environment is opened, it will silently overrule configuration done before that time.
The DB_ENV->rep_set_nsites method configures a database environment, not only operations performed using the specified DB_ENV handle.
The DB_ENV->rep_set_nsites method may not be called before the DB_ENV->rep_start method is called.
The DB_ENV->rep_set_nsites method returns a non-zero error value on failure and 0 on success.
ParametersThe DB_ENV->rep_get_nsites method returns the total number of sites in the replication group.
The DB_ENV->rep_get_nsites method may be called at any time during the life of the application.
The DB_ENV->rep_get_nsites method returns a non-zero error value on failure and 0 on success.
ParametersCopyright (c) 1996,2008 Oracle. All rights reserved.