<xml></xml>

Collapse AllExpand All Code: All Code: Multiple Code: C# Code: Visual Basic Code: Visual C++

Berkeley DB .NET API Documentation
DatabaseEnvironment..::.RepHoldElection Method (UInt32, UInt32)
DatabaseEnvironment Class See Also Send Feedback

Hold an election for the master of a replication group.

Namespace: BerkeleyDB
Assembly: libdb_dotnet62 (in libdb_dotnet62.dll) Version: 6.2.32.0

# Syntax

C#

    public void RepHoldElection(
    	uint nsites,
    	uint nvotes
    )

Visual Basic (Declaration)

    Public Sub RepHoldElection ( _
    	nsites As UInteger, _
    	nvotes As UInteger _
    )

Visual C++

    public:
    void RepHoldElection(
    	unsigned int nsites,
    	unsigned int nvotes
    )

#### Parameters

nsites
  Type: System..::.UInt32
  The number of replication sites expected to participate in the election. Once the current site has election information from that many sites, it short-circuits the election and immediately casts its vote for a new master. This parameter must be no less than nvotes, or 0 if the election should use RepNSites. If an application is using master leases, then the value must be 0 and RepNSites must be used.

nvotes
  Type: System..::.UInt32
  The minimum number of replication sites from which the current site must have election information, before the current site casts a vote for a new master. This parameter must be no greater than nsites, or 0 if the election should use the value ((nsites / 2) + 1).

# See Also

DatabaseEnvironment Class
RepHoldElection Overload
BerkeleyDB Namespace