### DB_ENV->rep_set_nsites

`

###

    #include <db.h>

    int
    DB_ENV->rep_set_nsites(DB_ENV *env, int nsites);

    int
    DB_ENV->rep_get_nsites(DB_ENV *env, int *nsitesp);

### Description: DB_ENV->rep_set_nsites

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 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 be called at any time during the life of the application.

The DB_ENV->rep_set_nsites method returns a non-zero error value on failure and 0 on success.

### Parameters

nsites
  A positive integer specifying the total number of sites in the replication group.

### Description: DB_ENV->rep_get_nsites

The 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.

### Parameters

nsitesp
  The DB_ENV->rep_get_nsites method returns the total number of sites in the replication group in nsitesp.

### Class

DB_ENV

### See Also

Replication and Related Methods`

Copyright (c) 1996,2007 Oracle. All rights reserved.