<xml></xml>

Collapse All Expand All Code: All Code: Multiple Code: C# Code: Visual Basic Code: Visual C++ Members: Show All Members: Filtered Members: Filtered Members: Filtered

Berkeley DB .NET API Documentation
DatabaseEnvironment..::.RepHoldElection Method
DatabaseEnvironment Class See Also Send Feedback

RepHoldElection is not called by most replication applications. It should only be called by applications implementing their own network transport layer, explicitly holding replication group elections and handling replication messages outside of the replication manager framework.

If the election is successful, Berkeley DB will notify the application of the results of the election by means of either the REP_ELECTED or REP_NEWMASTER events (see EventNotifyfor more information). The application is responsible for adjusting its relationship to the other database environments in the replication group, including directing all database updates to the newly selected master, in accordance with the results of the election.

The thread of control that calls RepHoldElection must not be the thread of control that processes incoming messages; processing the incoming messages is necessary to successfully complete an election.

Before calling this method, the RepTransport delegate must already have been configured to send replication messages.

# Overload List

| Name | Description
--- | --- | ---
| RepHoldElection()()() | Hold an election for the master of a replication group.
| RepHoldElection(UInt32) | Hold an election for the master of a replication group.
| RepHoldElection(UInt32, UInt32) | Hold an election for the master of a replication group.

# See Also

DatabaseEnvironment Class
DatabaseEnvironment Members
BerkeleyDB Namespace