1 23 24 package com.sun.ejb.containers.util.cache; 25 26 import com.sun.appserv.util.cache.Cache; 27 import com.sun.appserv.util.cache.CacheListener; 28 import com.sun.appserv.util.cache.Constants; 29 30 import java.util.Map ; 31 import java.util.HashMap ; 32 import java.util.Properties ; 33 import java.util.ResourceBundle ; 34 35 41 public class UnboundedEJBObjectCache 42 extends BaseCache 43 implements EJBObjectCache 44 { 45 48 public UnboundedEJBObjectCache(String name) { super(); } 49 50 53 public UnboundedEJBObjectCache(String name, long timeout) { 54 super(); 55 } 56 57 public void init(int maxEntries, int numberOfVictimsToSelect, 58 long timeout, float loadFactor, Properties props) 59 { 60 super.init(maxEntries, loadFactor, props); 61 } 62 63 public Object get(Object key, boolean incrementRefCount) { 64 return super.get(key); 65 } 66 67 public Object put(Object key, Object value, boolean linkWithLru) { 68 return super.put(key, value); 69 } 70 71 public Object remove(Object key, boolean decrementRefCount) { 72 return super.remove(key); 73 } 74 75 public void setEJBObjectCacheListener(EJBObjectCacheListener listener) { 76 } 78 79 protected void trimItem(CacheItem item) { 80 81 } 82 83 public Map getStats() { 84 Map map = new HashMap (); 85 StringBuffer sbuf = new StringBuffer (); 86 sbuf.append("(listSize = 0") 87 .append("; cacheSize = ").append(getEntryCount()) 88 .append(")"); 89 map.put("_UnBoundedEJBObject ==> ", sbuf.toString()); 90 return map; 91 } 92 93 } 94 | Popular Tags |