Library Version 12.1.6.0

DbEnv::repmgr_local_site()
Prev | Chapter 11. Replication Methods | Next

## DbEnv::repmgr_local_site()

    #include <db_cxx.h>

    int
    DbEnv::repmgr_local_site(DB_SITE **sitep);

The `DbEnv::repmgr_local_site()` method returns a DbSite handle that defines the local site's host/port network address. You use the DbSite handle to configure and manage replication sites.

This method allocates memory for the handle, returning a pointer to the structure in the memory to which sitep refers. To release the allocated memory and discard the handle, call the DbSite::close() method.

The `DbEnv::repmgr_local_site()` method may be called at any time after the environment handle has been created.

The `DbEnv::repmgr_local_site()` 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.

### Parameters

#### sitep

References memory into which a pointer to the allocated handle is copied.

### Errors

The `DbEnv::repmgr_local_site()` 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:

#### EINVAL

If this method is called from a Base API application, or if an invalid flag value or parameter was specified.

### Class

DbEnv

### See Also

Replication and Related Methods

Prev | Up | Next
DbEnv::repmgr_channel() | Home | DbEnv::repmgr_get_ack_policy()