Guest User

Untitled

a guest
Dec 12th, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. public int evict(int evictionQuota){
  2. int counter = 0;
  3. int mappingsSize = getQueue().size();
  4. for(int i = 0; i < Math.min(mappingsSize, evictionQuota) && counter < evictionQuota; i++) {
  5. Iterator<EvictableServerEntry> iterator = getQueue().values().iterator();
  6. while(iterator.hasNext() && counter < evictionQuota){
  7. EvictableServerEntry next = iterator.next();
  8. ...
  9. if(getEvictionManager().tryEvict(next)){
  10. counter++;
  11. }
  12. }
  13. }
  14. ...
  15. return counter;
  16. }
Add Comment
Please, Sign In to add comment