Interface GroupMembershipProtocol

All Superinterfaces:
io.atomix.utils.config.Configured<GroupMembershipProtocolConfig>, io.atomix.utils.event.ListenerService<GroupMembershipEvent,​GroupMembershipEventListener>
All Known Implementing Classes:
HeartbeatMembershipProtocol, SwimMembershipProtocol

public interface GroupMembershipProtocol
extends io.atomix.utils.event.ListenerService<GroupMembershipEvent,​GroupMembershipEventListener>, io.atomix.utils.config.Configured<GroupMembershipProtocolConfig>
Group membership protocol.
  • Method Details

    • getMembers

      Set<Member> getMembers()
      Returns the set of current cluster members.
      Returns:
      set of cluster members
    • getMember

      Member getMember​(MemberId memberId)
      Returns the specified member.
      Parameters:
      memberId - the member identifier
      Returns:
      the member or null if no node with the given identifier exists
    • join

      CompletableFuture<Void> join​(BootstrapService bootstrap, NodeDiscoveryService discovery, Member localMember)
      Joins the cluster.
      Parameters:
      bootstrap - the bootstrap service
      discovery - the discovery service
      localMember - the local member info
      Returns:
      a future to be completed once the join is complete
    • leave

      CompletableFuture<Void> leave​(Member localMember)
      Leaves the cluster.
      Parameters:
      localMember - the local member info
      Returns:
      a future to be completed once the leave is complete