Package io.atomix.cluster.protocol
Interface GroupMembershipProtocol
- All Superinterfaces:
Configured<GroupMembershipProtocolConfig>,ListenerService<GroupMembershipEvent,GroupMembershipEventListener>
- All Known Implementing Classes:
SwimMembershipProtocol
public interface GroupMembershipProtocol
extends ListenerService<GroupMembershipEvent,GroupMembershipEventListener>, Configured<GroupMembershipProtocolConfig>
Group membership protocol.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceGroup membership protocol type. -
Method Summary
Modifier and TypeMethodDescriptionReturns the specified member.Returns the set of current cluster members.join(BootstrapService bootstrap, NodeDiscoveryService discovery, Member localMember) Joins the cluster.Leaves the cluster.Methods inherited from interface io.atomix.utils.config.Configured
configMethods inherited from interface io.atomix.utils.event.ListenerService
addListener, removeListener
-
Method Details
-
getMembers
Returns the set of current cluster members.- Returns:
- set of cluster members
-
getMember
Returns the specified member.- Parameters:
memberId- the member identifier- Returns:
- the member or
nullif no node with the given identifier exists
-
join
CompletableFuture<Void> join(BootstrapService bootstrap, NodeDiscoveryService discovery, Member localMember) Joins the cluster.- Parameters:
bootstrap- the bootstrap servicediscovery- the discovery servicelocalMember- the local member info- Returns:
- a future to be completed once the join is complete
-
leave
Leaves the cluster.- Parameters:
localMember- the local member info- Returns:
- a future to be completed once the leave is complete
-