Interface GroupMembership<M extends GroupMember>

Type Parameters:
M - the group member type
All Superinterfaces:
GroupMembership<M>
All Known Implementing Classes:
ViewMembership

public interface GroupMembership<M extends GroupMember> extends GroupMembership<M>
Group membership whose coordinator is identified by its index in the membership.
Author:
Paul Ferraro
  • Method Details

    • getCoordinatorIndex

      int getCoordinatorIndex()
      Returns the index of the group coordinator.
      Returns:
      the index of the group coordinator.
    • getCoordinator

      default M getCoordinator()
      Description copied from interface: GroupMembership
      Returns the coordinator of this group membership. All members of this membership will always agree on which member is the coordinator.
      Specified by:
      getCoordinator in interface GroupMembership<M extends GroupMember>
      Returns:
      the group coordinator
    • singleton

      static <M extends GroupMember> GroupMembership<M> singleton(M member)
      Returns a singleton group membership.
      Type Parameters:
      M - the member type
      Parameters:
      member - the single group member
      Returns:
      a singleton group membership.