Interface Membership


  • public interface Membership
    Encapsulates an immutable membership of a group.
    Author:
    Paul Ferraro
    • Method Detail

      • isCoordinator

        boolean isCoordinator()
        Indicates whether or not the local node is the coordinator of this group membership. Semantically equivalent to: group.getLocalNode().equals(#getCoordinator())
        Returns:
        true, if we are the group membership coordinator, false otherwise
      • getCoordinator

        Node getCoordinator()
        Returns the coordinator node of this group membership. All nodes of this membership will always agree on which node is the coordinator.
        Returns:
        the group coordinator node
      • getMembers

        List<Node> getMembers()
        Returns the nodes that comprise this group membership. The membership order will be consistent on each node in the group.
        Returns:
        a list of nodes ordered by descending age.