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 31 public abstract class AbstractDelegatingCacheLoader extends AbstractCacheLoader 32 { 33 private CacheLoader cacheLoader; 34 35 public AbstractDelegatingCacheLoader(CacheLoader cl) 36 { 37 cacheLoader = cl; 38 } 39 40 public CacheLoader getCacheLoader() 41 { 42 return cacheLoader; 43 } 44 45 public void setCacheLoader(CacheLoader cacheLoader) 46 { 47 this.cacheLoader = cacheLoader; 48 } 49 50 public void setConfig(IndividualCacheLoaderConfig config) 51 { 52 cacheLoader.setConfig(config); 53 } 54 55 public IndividualCacheLoaderConfig getConfig() 56 { 57 return cacheLoader.getConfig(); 58 } 59 60 public void setCache(CacheSPI c) 61 { 62 super.setCache(c); 63 cacheLoader.setCache(c); 64 } 65 66 public Set getChildrenNames(Fqn fqn) throws Exception 67 { 68 return cacheLoader.getChildrenNames(fqn); 69 } 70 71 public Map get(Fqn name) throws Exception 72 { 73 return cacheLoader.get(name); 74 } 75 76 public boolean exists(Fqn name) throws Exception 77 { 78 return cacheLoader.exists(name); 79 } 80 81 public Object put(Fqn name, Object key, Object value) throws Exception 82 { 83 return cacheLoader.put(name, key, value); 84 } 85 86 public void put(Fqn name, Map attributes) throws Exception 87 { 88 cacheLoader.put(name, attributes); 89 } 90 91 public void put(List <Modification> modifications) throws Exception 92 { 93 cacheLoader.put(modifications); 94 } 95 96 public Object remove(Fqn fqn, Object key) throws Exception 97 { 98 return cacheLoader.remove(fqn, key); 99 } 100 101 public void remove(Fqn fqn) throws Exception 102 { 103 cacheLoader.remove(fqn); 104 } 105 106 public void removeData(Fqn fqn) throws Exception 107 { 108 cacheLoader.removeData(fqn); 109 } 110 111 public void prepare(Object tx, List <Modification> modifications, boolean one_phase) throws Exception 112 { 113 cacheLoader.prepare(tx, modifications, one_phase); 114 } 115 116 public void commit(Object tx) throws Exception 117 { 118 cacheLoader.commit(tx); 119 } 120 121 public void rollback(Object tx) 122 { 123 cacheLoader.rollback(tx); 124 } 125 126 public void loadEntireState(ObjectOutputStream os) throws Exception 127 { 128 cacheLoader.loadEntireState(os); 129 } 130 131 public void storeEntireState(ObjectInputStream is) throws Exception 132 { 133 cacheLoader.storeEntireState(is); 134 } 135 136 public void loadState(Fqn subtree, ObjectOutputStream os) throws Exception 137 { 138 cacheLoader.loadState(subtree, os); 139 } 140 141 public void storeState(Fqn subtree, ObjectInputStream is) throws Exception 142 { 143 cacheLoader.storeState(subtree, is); 144 } 145 146 public void setRegionManager(RegionManager manager) 147 { 148 cacheLoader.setRegionManager(manager); 149 } 150 151 public void create() throws Exception 152 { 153 cacheLoader.create(); 154 } 155 156 public void start() throws Exception 157 { 158 cacheLoader.start(); 159 } 160 161 public void stop() 162 { 163 cacheLoader.stop(); 164 } 165 166 public void destroy() 167 { 168 cacheLoader.destroy(); 169 } 170 } 171 | Popular Tags |