1 4 package com.tc.object.cache; 5 6 import com.tc.text.PrettyPrinter; 7 8 import java.util.Collection ; 9 import java.util.Collections ; 10 11 14 public class NullCache implements EvictionPolicy { 15 16 public synchronized boolean add(Cacheable obj) { 17 return false; 18 } 19 20 public Collection getRemovalCandidates(int maxCount) { 21 return Collections.EMPTY_LIST; 22 } 23 24 public synchronized void remove(Cacheable obj) { 25 } 27 28 public synchronized void markReferenced(Cacheable obj) { 29 } 31 32 public PrettyPrinter prettyPrint(PrettyPrinter out) { 33 return out.println("NULL CACHE"); 34 } 35 36 public int getCacheCapacity() { 37 return Integer.MAX_VALUE; 38 } 39 } | Popular Tags |