1 23 24 29 30 package com.sun.appserv.util.cache; 31 32 import java.util.ArrayList ; 33 import java.util.Iterator ; 34 import java.util.Enumeration ; 35 import java.util.Map ; 36 import java.util.Properties ; 37 38 42 public interface Cache { 43 44 51 public void init(int maxEntries, 52 float loadFactor, Properties props) throws Exception ; 53 54 60 public void init(int maxEntries, Properties props) throws Exception ; 61 62 66 public void addCacheListener(CacheListener listener); 67 68 73 public int getIndex(Object key); 74 75 82 public Object get(Object key); 83 84 89 public Iterator getAll(Object key); 90 91 96 public boolean contains(Object key); 97 98 102 public Iterator keys(); 103 104 109 public Enumeration elements(); 110 111 115 public Iterator values(); 116 117 125 public Object put(Object key, Object value); 126 127 136 public Object put(Object key, Object value, int size); 137 138 145 public void add(Object key, Object value); 146 147 155 public void add(Object key, Object value, int size); 156 157 164 public Object remove(Object key); 165 166 172 public Object remove(Object key, Object value); 173 174 178 public void removeAll(Object key); 179 180 187 public boolean waitRefresh(int index); 188 189 194 public void notifyRefresh(int index); 195 196 200 public int clear(); 201 202 206 public boolean isEmpty(); 207 208 212 public int getEntryCount(); 213 214 217 223 public Object getStatByName(String key); 224 225 230 public Map getStats(); 231 232 235 public void clearStats(); 236 237 244 public void trimExpiredEntries(int maxCount); 245 246 249 public void destroy(); 250 } 251 | Popular Tags |