Interface MembershipProvider

All Known Implementing Classes:
CloudMembershipProvider, DNSMembershipProvider, KubernetesMembershipProvider, McastServiceImpl, MembershipProviderBase, StaticMembershipProvider

public interface MembershipProvider
  • Method Details

    • init

      void init(Properties properties) throws Exception
      Initialize the membership provider with the specified configuration.
      Parameters:
      properties - configuration
      Throws:
      Exception - if an error occurs
    • start

      void start(int level) throws Exception
      Start the membership provider.
      Parameters:
      level - the readiness level
      Channel.DEFAULT - will start all services
      Channel.MBR_RX_SEQ - starts the membership receiver
      Channel.MBR_TX_SEQ - starts the membership broadcaster
      Throws:
      Exception - if an error occurs
    • stop

      boolean stop(int level) throws Exception
      Stop the membership provider.
      Parameters:
      level - the readiness level
      Channel.DEFAULT - will stop all services
      Channel.MBR_RX_SEQ - stops the membership receiver
      Channel.MBR_TX_SEQ - stops the membership broadcaster
      Returns:
      true if successful
      Throws:
      Exception - if an error occurs
    • setMembershipListener

      void setMembershipListener(MembershipListener listener)
      Set the associated membership listener.
      Parameters:
      listener - the listener
    • setMembershipService

      void setMembershipService(MembershipService service)
      Set the associated membership service.
      Parameters:
      service - the service
    • hasMembers

      boolean hasMembers()
      Returns:
      true if there are members
    • getMember

      Member getMember(Member mbr)
      Get the specified member from the associated membership.
      Parameters:
      mbr - the member
      Returns:
      the member
    • getMembers

      Member[] getMembers()
      Get the members from the associated membership.
      Returns:
      the members