Interface MembershipConsumerBabelProtocol

All Superinterfaces:
BabelProtocol

public interface MembershipConsumerBabelProtocol extends BabelProtocol
Interface for protocols that consume a membership (overlay neighbour) service.

Implementing protocols receive neighbour change notifications and can request a snapshot of the current neighbour set:

A MembershipConsumerExtensionFactory must be registered with the BabelBootstrap for the callbacks to be wired automatically.

See Also:
  • Method Details

    • neighbourUp

      void neighbourUp(BabelNode node)
      Called when a new neighbour identified by node has joined the overlay and is now considered an active member.
      Parameters:
      node - the newly joined neighbour
    • neigbourDown

      void neigbourDown(BabelNode node)
      Called when neighbour node has left or become unreachable.
      Parameters:
      node - the neighbour that has gone down
    • askNeighbourSet

      default void askNeighbourSet(Babel runtime)
      Requests the current set of neighbours from the membership provider by dispatching an AskNeighbourSet event. The provider responds asynchronously via setNeighbours(Set).
      Parameters:
      runtime - the Babel runtime used to dispatch the request
    • setNeighbours

      default void setNeighbours(Set<BabelNode> neighbours)
      Called with the current neighbour set in response to a previous askNeighbourSet(Babel) call. The default implementation is a no-op; override to process the received set.
      Parameters:
      neighbours - the current set of active neighbours