Interface DistributionSchedule.AckSet

  • Enclosing interface:
    DistributionSchedule

    public static interface DistributionSchedule.AckSet
    An ack set represents the set of bookies from which a response must be received so that an entry can be considered to be replicated on a quorum.
    • Method Detail

      • completeBookieAndCheck

        boolean completeBookieAndCheck​(int bookieIndexHeardFrom)
        Add a bookie response and check if quorum has been met.
        Returns:
        true if quorum has been met, false otherwise
      • failBookieAndCheck

        boolean failBookieAndCheck​(int bookieIndexHeardFrom,
                                   BookieId address)
        Received failure response from a bookie and check if ack quorum will be broken.
        Parameters:
        bookieIndexHeardFrom - bookie index that failed.
        address - bookie address
        Returns:
        true if ack quorum is broken, false otherwise.
      • getFailedBookies

        java.util.Map<java.lang.Integer,​BookieId> getFailedBookies()
        Return the list of bookies that already failed.
        Returns:
        the list of bookies that already failed.
      • removeBookieAndCheck

        boolean removeBookieAndCheck​(int bookie)
        Invalidate a previous bookie response. Used for reissuing write requests.
      • recycle

        void recycle()
        Recycle this ack set when not used anymore.