Package org.apache.bookkeeper.client
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 TypeMethodDescriptionbooleancompleteBookieAndCheck(int bookieIndexHeardFrom) Add a bookie response and check if quorum has been met.booleanfailBookieAndCheck(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.voidrecycle()Recycle this ack set when not used anymore.booleanremoveBookieAndCheck(int bookie) 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
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
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.
-