/** * Adds mbr to votes and returns true if we have all the votes, otherwise false. * @param rank */ @GuardedBy("lock") protected boolean addVote(int rank) { try { return votes.set(rank) && allVotesReceived(votes); } catch(Throwable t) { return false; } }
/** * Adds mbr to votes and returns true if we have all the votes, otherwise false. * @param mbr */ @GuardedBy("lock") private boolean addVote(Address mbr) { boolean added=votes.add(mbr); return added && allVotesReceived(votes); }
/** * Adds mbr to votes and returns true if we have all the votes, otherwise false. * @param rank */ @GuardedBy("lock") protected boolean addVote(int rank) { try { return votes.set(rank) && allVotesReceived(votes); } catch(Throwable t) { return false; } }