1 7 package org.jboss.cache.loader; 8 9 import org.jboss.cache.CacheSPI; 10 import org.jboss.cache.Fqn; 11 import org.jboss.cache.Modification; 12 import org.jboss.cache.RegionManager; 13 import org.jboss.cache.config.CacheLoaderConfig.IndividualCacheLoaderConfig; 14 15 import java.io.ObjectInputStream ; 16 import java.io.ObjectOutputStream ; 17 import java.util.List ; 18 import java.util.Map ; 19 import java.util.Set ; 20 21 40 41 public interface CacheLoader 42 { 43 53 void setConfig(IndividualCacheLoaderConfig config); 54 55 60 IndividualCacheLoaderConfig getConfig(); 61 62 69 void setCache(CacheSPI c); 70 71 72 83 Set <String > getChildrenNames(Fqn fqn) throws Exception ; 84 85 93 Map <Object , Object > get(Fqn name) throws Exception ; 94 95 96 101 boolean exists(Fqn name) throws Exception ; 102 103 104 109 Object put(Fqn name, Object key, Object value) throws Exception ; 110 111 121 void put(Fqn name, Map <Object , Object > attributes) throws Exception ; 122 123 129 void put(List <Modification> modifications) throws Exception ; 130 131 136 Object remove(Fqn fqn, Object key) throws Exception ; 137 138 143 void remove(Fqn fqn) throws Exception ; 144 145 146 152 void removeData(Fqn fqn) throws Exception ; 153 154 155 171 void prepare(Object tx, List <Modification> modifications, boolean one_phase) throws Exception ; 172 173 184 void commit(Object tx) throws Exception ; 185 186 193 void rollback(Object tx); 194 195 215 void loadEntireState(ObjectOutputStream os) throws Exception ; 216 217 235 void storeEntireState(ObjectInputStream is) throws Exception ; 236 237 260 void loadState(Fqn subtree, ObjectOutputStream os) throws Exception ; 261 262 296 void storeState(Fqn subtree, ObjectInputStream is) throws Exception ; 297 298 310 void setRegionManager(RegionManager manager); 311 312 317 void create() throws java.lang.Exception ; 318 319 324 void start() throws java.lang.Exception ; 325 326 329 void stop(); 330 331 334 void destroy(); 335 336 } 337 | Popular Tags |