Permalink
Browse files

ns

  • Loading branch information...
1 parent 3f5ee23 commit 52919ae0edf281bb7147c72c6a70a3ebbcf2c24f Bela Ban committed Feb 11, 2011
Showing with 7 additions and 0 deletions.
  1. +7 −0 src/org/jgroups/util/CreditMap.java
@@ -258,6 +258,13 @@ protected long computeLowestCredit() {
return lowest;
}
+ public long computeLowestCreditWithAccumulated() {
+ long lowest=max_credits;
+ for(long cred: credits.values())
+ lowest=Math.min(cred, lowest);
+ return lowest - accumulated_credits;
+ }
+
/**
* Decrements credits bytes from all elements and add new_credits to member (if non null).
* The lowest credit needs to be greater than min_credits. Needs to be called with lock held

0 comments on commit 52919ae

Please sign in to comment.