01: package com.completex.objective.components.ocache.impl;
02:
03: import com.completex.objective.components.ocache.OdalKeyFactory;
04: import com.completex.objective.components.ocache.OdalKeyedCache;
05: import com.completex.objective.components.ocache.SafeWrapper;
06: import com.completex.objective.components.ocache.OdalCache;
07:
08: /**
09: * Thread safe OdalCache wrapper for TransactionSensitiveCacheImpl
10: *
11: * @author Gennady Krizhevsky
12: */
13: public class SafeTransactionSensitiveCacheImpl implements
14: OdalKeyedCache, SafeWrapper {
15: private final TransactionSensitiveCacheImpl delegate;
16:
17: public SafeTransactionSensitiveCacheImpl(
18: TransactionSensitiveCacheImpl transactionSensitiveCache) {
19: this .delegate = transactionSensitiveCache;
20: }
21:
22: /**
23: * @see com.completex.objective.components.ocache.OdalKeyedCache#getKeyFactory()
24: */
25: public synchronized OdalKeyFactory getKeyFactory() {
26: return delegate.getKeyFactory();
27: }
28:
29: /**
30: * @see com.completex.objective.components.ocache.OdalKeyedCache#isMarkCacheCollectionElements()
31: */
32: public boolean isMarkCacheCollectionElements() {
33: return delegate.isMarkCacheCollectionElements();
34: }
35:
36: /**
37: * @see com.completex.objective.components.ocache.OdalCache#get(Object)
38: */
39: public synchronized Object get(Object key) {
40: return delegate.get(key);
41: }
42:
43: public void put(Object value) {
44: delegate.put(value);
45: }
46:
47: /**
48: * @see com.completex.objective.components.ocache.OdalCache#put(Object, Object)
49: */
50: public synchronized Object put(Object key, Object value) {
51: return delegate.put(key, value);
52: }
53:
54: /**
55: * @see com.completex.objective.components.ocache.OdalCache#remove(Object)
56: */
57: public synchronized Object remove(Object key) {
58: return delegate.remove(key);
59: }
60:
61: /**
62: * @see com.completex.objective.components.ocache.OdalCache#clear()
63: */
64: public synchronized void clear() {
65: delegate.clear();
66: }
67:
68: /**
69: * @see com.completex.objective.components.ocache.OdalCache#getName()
70: */
71: public String getName() {
72: return delegate.getName();
73: }
74:
75: /**
76: * @see com.completex.objective.components.ocache.SafeWrapper#getDelegate()
77: */
78: public OdalKeyedCache getDelegate() {
79: return delegate;
80: }
81:
82: /**
83: * @see com.completex.objective.components.ocache.OdalCacheWrapper#getCoreCache()
84: */
85: public OdalCache getCoreCache() {
86: return delegate;
87: }
88:
89: }
|