1 7 package org.jboss.cache; 8 9 import org.jboss.cache.config.Configuration; 10 import org.jgroups.Address; 11 12 import java.util.List ; 13 import java.util.Map ; 14 import java.util.Set ; 15 16 28 public interface Cache 29 { 30 35 Configuration getConfiguration(); 36 37 43 Node getRoot(); 44 45 50 void addCacheListener(CacheListener l); 51 52 58 void addCacheListener(Fqn region, CacheListener l); 59 60 65 void removeCacheListener(CacheListener l); 66 67 73 void removeCacheListener(Fqn region, CacheListener l); 74 75 80 Set <CacheListener> getCacheListeners(); 81 82 87 Set <CacheListener> getCacheListeners(Fqn region); 88 89 97 Object put(Fqn fqn, Object key, Object value); 98 99 116 void putForExternalRead(Fqn fqn, Object key, Object value); 117 118 124 void put(Fqn fqn, Map data); 125 126 133 Object remove(Fqn fqn, Object key); 134 135 138 void removeNode(Fqn fqn); 139 140 146 Object get(Fqn fqn, Object key); 147 148 154 void evict(Fqn fqn, boolean recursive); 155 156 169 Region getRegion(Fqn fqn, boolean createIfAbsent); 170 171 174 void create() throws Exception ; 175 176 179 void start() throws Exception ; 180 181 184 void stop(); 185 186 189 void destroy(); 190 191 196 InvocationContext getInvocationContext(); 197 198 203 void setInvocationContext(InvocationContext ctx); 204 205 208 Address getLocalAddress(); 209 210 213 List <Address> getMembers(); 214 215 261 void move(Fqn nodeToMove, Fqn newParent) throws NodeNotExistsException; 262 263 266 String getVersion(); 267 } 268 | Popular Tags |