Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public int evict(int evictionQuota){
- int counter = 0;
- int mappingsSize = getQueue().size();
- for(int i = 0; i < Math.min(mappingsSize, evictionQuota) && counter < evictionQuota; i++) {
- Iterator<EvictableServerEntry> iterator = getQueue().values().iterator();
- while(iterator.hasNext() && counter < evictionQuota){
- EvictableServerEntry next = iterator.next();
- ...
- if(getEvictionManager().tryEvict(next)){
- counter++;
- }
- }
- }
- ...
- return counter;
- }
Add Comment
Please, Sign In to add comment