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 Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean completeBookieAndCheck​(int bookieIndexHeardFrom)
      Add a bookie response and check if quorum has been met.
      boolean failBookieAndCheck​(int bookieIndexHeardFrom, org.apache.bookkeeper.net.BookieId address)
      Received failure response from a bookie and check if ack quorum will be broken.
      java.util.Map<java.lang.Integer,​org.apache.bookkeeper.net.BookieId> getFailedBookies()
      Return the list of bookies that already failed.
      void recycle()
      Recycle this ack set when not used anymore.
      boolean removeBookieAndCheck​(int bookie)
      Invalidate a previous bookie response.
    • 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,
                                   org.apache.bookkeeper.net.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,​org.apache.bookkeeper.net.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.