Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public int evict(int evictionQuota){
- int counter = 0;
- for(ConcurrentHashMap<Integer, SpaceEvictionStrategy> priorityLevel : getPriorities().values()){
- if(counter == evictionQuota)
- break;
- if(priorityLevel.isEmpty())
- continue;
- for (SpaceEvictionStrategy strategy : priorityLevel.values()) {
- counter += strategy.evict(evictionQuota - counter);
- if(counter == evictionQuota)
- break;
- }
- }
- return counter;
- }
Add Comment
Please, Sign In to add comment