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