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

    Modifier and Type
    Method
    Description
    boolean
    completeBookieAndCheck(int bookieIndexHeardFrom)
    Add a bookie response and check if quorum has been met.
    boolean
    failBookieAndCheck(int bookieIndexHeardFrom, BookieId address)
    Received failure response from a bookie and check if ack quorum will be broken.
    Return the list of bookies that already failed.
    void
    Recycle this ack set when not used anymore.
    boolean
    Invalidate a previous bookie response.
  • Method Details

    • 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

      Map<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.