1 64 65 package com.jcorporate.expresso.core.cache; 66 67 79 public interface CacheSystem { 80 81 85 void adjustForMemory(); 86 87 93 java.util.Set getAllCacheNames(); 94 95 102 Cacheable getItem(String cacheName, String valueKey); 103 104 105 112 Cache getCache(String cacheName); 113 114 121 int getItemCount(String cacheName); 122 123 130 void setItems(String cacheName, java.util.List itemList) throws CacheException; 131 132 133 141 void setItems(String cacheName, java.util.List itemList, long expiration) throws CacheException; 142 143 152 java.util.List getItems(String cacheName); 153 154 161 void addItem(String cacheName, Cacheable newItem) throws CacheException; 162 163 164 173 void addItem(String cacheName, Cacheable newItem, long expiry) throws CacheException; 174 175 188 void put(String cacheName, Cacheable newItem) throws CacheException; 189 190 204 void put(String cacheName, Cacheable newItem, long expiry) throws CacheException; 205 206 207 217 void addListener(String listener, String listenTo); 218 219 225 void clear(String cacheName) throws CacheException; 226 227 233 void clear() throws CacheException; 234 235 238 void clearNoNotify(); 239 240 247 void clearNoNotify(String cacheName); 248 249 258 Cache createCache(String cacheName, boolean ordered) throws CacheException; 259 260 269 Cache createCache(String cacheName, boolean ordered, int maxSize) throws CacheException; 270 271 279 boolean existsCache(String cacheName); 280 281 287 void removeItem(String cacheName, Cacheable itemToRemove) throws CacheException; 288 289 296 void removeItemNoNotify(String cacheName, Cacheable itemToRemove) throws CacheException; 297 298 299 304 void displayStatus(); 305 306 } 307 | Popular Tags |