ReplicationGroup (Oracle - Berkeley DB Java Edition API)
Date: 2014-12-16

com.sleepycat.je.rep

## Class ReplicationGroup

- java.lang.Object
- - com.sleepycat.je.rep.ReplicationGroup

-     public class ReplicationGroup
      extends Object

  An administrative view of the collection of nodes that form the replication group. Can be obtained from a `ReplicatedEnvironment` or a `ReplicationGroupAdmin`.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Set<ReplicationNode>` | `getDataNodes()` Returns the subset of nodes in the group that store replication data.
    `Set<ReplicationNode>` | `getElectableNodes()` Returns the subset of nodes in the group with replicated environments that participate in elections and can become masters, ignoring node priority.
    `ReplicationNode` | `getMember(String nodeName)` Get administrative information about a node by its node name.
    `Set<ReplicationNode>` | `getMonitorNodes()` Returns the subset of nodes in the group that monitor group membership but do not maintain replicated environments.
    `String` | `getName()` Returns the name associated with the group.
    `Set<ReplicationNode>` | `getNodes()` Returns the set of all nodes in the group.
    `Set<ReplicationNode>` | `getSecondaryNodes()` Returns the subset of nodes in the group with replicated environments that do not participate in elections and cannot become masters.
    `String` | `toString()` Returns a formatted version of the information held in a ReplicationGroup.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Method Detail

    - #### getName

          public String getName()

      Returns the name associated with the group.
      Returns:
        the name of the replication group.

    - #### getNodes

          public Set<ReplicationNode> getNodes()

      Returns the set of all nodes in the group. The return value includes ELECTABLE, MONITOR, and SECONDARY nodes.

      Note that SECONDARY nodes will only be included in the result when this method is called for a replicated environment that is the master.

      Returns:
        the set of all nodes
      See Also:
        `NodeType`

    - #### getElectableNodes

          public Set<ReplicationNode> getElectableNodes()

      Returns the subset of nodes in the group with replicated environments that participate in elections and can become masters, ignoring node priority. The return value includes ELECTABLE nodes, and excludes MONITOR and SECONDARY nodes.
      Returns:
        the set of electable nodes
      See Also:
        `NodeType`

    - #### getSecondaryNodes

          public Set<ReplicationNode> getSecondaryNodes()

      Returns the subset of nodes in the group with replicated environments that do not participate in elections and cannot become masters. The return value includes SECONDARY nodes, and excludes ELECTABLE and MONITOR nodes.

      Note that SECONDARY nodes will only be returned when this method is called for a replicated environment that is the master.

      Returns:
        the set of secondary nodes
      Since:
        6.0
      See Also:
        `NodeType`

    - #### getMonitorNodes

          public Set<ReplicationNode> getMonitorNodes()

      Returns the subset of nodes in the group that monitor group membership but do not maintain replicated environments. The return value includes MONITOR nodes, but excludes ELECTABLE and SECONDARY nodes.
      Returns:
        the set of monitor nodes
      See Also:
        `NodeType`

    - #### getDataNodes

          public Set<ReplicationNode> getDataNodes()

      Returns the subset of nodes in the group that store replication data. The return value includes all ELECTABLE and SECONDARY nodes, but excludes MONITOR nodes.

      Note that SECONDARY nodes will only be included in the result when this method is called for a replicated environment that is the master.

      Returns:
        the set of data nodes
      Since:
        6.0
      See Also:
        `NodeType`

    - #### getMember

          public ReplicationNode getMember(String nodeName)

      Get administrative information about a node by its node name.

      Note that SECONDARY nodes will only be returned when this method is called for a replicated environment that is the master.

      Parameters:
        `nodeName` - the node name to be used in the lookup
      Returns:
        an administrative view of the node associated with nodeName, or null if there isn't such a node currently in the group

    - #### toString

          public String toString()

      Returns a formatted version of the information held in a ReplicationGroup.
      Overrides:
        `toString` in class `Object`

Copyright (c) 2004, 2014 Oracle and/or its affiliates. All rights reserved.