Class ConfigurableQuorumPolicy.MembershipQuorumPolicy

    • Constructor Detail

      • MembershipQuorumPolicy

        protected MembershipQuorumPolicy()
        Create a MembershipQuorumPolicy.
    • Method Detail

      • getService

        public Service getService()
        Return the Service which this policy applies to.
        Returns:
        the Service which this policy applies to
      • setService

        protected void setService​(Service service)
        Set the service that this policy applies to.
        Parameters:
        service - the Service that this policy applies to
      • getLeavingMembers

        protected Set getLeavingMembers()
        Return the set of members that are leaving the associated service
        Returns:
        the set of members that are leaving the associated service
      • getPolicyPopulation

        protected int getPolicyPopulation()
        Calculate and return the current size of the member set that contributes to the quorum for this policy domain.
        Returns:
        the current size
      • updateCurrentRule

        protected void updateCurrentRule()
        Update the currently applicable quorum rule, possibly changing it to reflect growth or shrinkage of the membership size.
      • init

        public void init​(Service service)
        Called when the specified service loads and configures this policy.

        Note: A policy could be applied to multiple services.

        Parameters:
        service - the service that this policy applies to
      • toString

        public String toString()
        Return a human-readable String representation of this ActionPolicy.

        Note: this method may be used to provide information about this ActionPolicy to management interfaces.

        Specified by:
        toString in interface ActionPolicy
        Overrides:
        toString in class Object
      • instantiateMemberListener

        protected MemberListener instantiateMemberListener()
        Instantiate a member listener to subscribe to service membership events.
        Returns:
        a member listener