1 /***
2 * Copyright 2003-2010 Terracotta, Inc.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17 package net.sf.ehcache.constructs;
18
19 import java.beans.PropertyChangeListener;
20 import java.io.Serializable;
21 import java.util.Collection;
22 import java.util.List;
23 import java.util.Map;
24
25 import net.sf.ehcache.CacheException;
26 import net.sf.ehcache.CacheManager;
27 import net.sf.ehcache.Ehcache;
28 import net.sf.ehcache.Element;
29 import net.sf.ehcache.Statistics;
30 import net.sf.ehcache.Status;
31 import net.sf.ehcache.bootstrap.BootstrapCacheLoader;
32 import net.sf.ehcache.config.CacheConfiguration;
33 import net.sf.ehcache.event.RegisteredEventListeners;
34 import net.sf.ehcache.exceptionhandler.CacheExceptionHandler;
35 import net.sf.ehcache.extension.CacheExtension;
36 import net.sf.ehcache.loader.CacheLoader;
37 import net.sf.ehcache.search.Attribute;
38 import net.sf.ehcache.search.Query;
39 import net.sf.ehcache.statistics.CacheUsageListener;
40 import net.sf.ehcache.statistics.LiveCacheStatistics;
41 import net.sf.ehcache.statistics.sampled.SampledCacheStatistics;
42 import net.sf.ehcache.terracotta.TerracottaNotRunningException;
43 import net.sf.ehcache.transaction.manager.TransactionManagerLookup;
44 import net.sf.ehcache.writer.CacheWriter;
45 import net.sf.ehcache.writer.CacheWriterManager;
46
47 /***
48 * Adapter class for Ehcache interface decorators. Implements all method in {@link Ehcache} by delegating all calls to the decorated
49 * {@link Ehcache}. This class is provided as a convenience for easily creating {@link Ehcache} decorators by extending this class and
50 * overriding only the methods of interest.
51 *
52 * @author Abhishek Sanoujam
53 *
54 */
55 public class EhcacheDecoratorAdapter implements Ehcache {
56
57 /***
58 * The decorated {@link Ehcache}, has protected visibility so that sub-classes can have access to it.
59 */
60 protected final Ehcache underlyingCache;
61
62 /***
63 * Constructor accepting the cache to be decorated
64 *
65 * @param underlyingCache
66 */
67 public EhcacheDecoratorAdapter(Ehcache underlyingCache) {
68 this.underlyingCache = underlyingCache;
69 }
70
71 /***
72 * {@inheritDoc}
73 */
74 public Element get(Object key) throws IllegalStateException, CacheException {
75 return underlyingCache.get(key);
76 }
77
78 /***
79 * {@inheritDoc}
80 */
81 public Map<Object, Element> getAll(Collection<Object> keys) throws IllegalStateException, CacheException {
82 return underlyingCache.getAll(keys);
83 }
84
85 /***
86 * {@inheritDoc}
87 */
88 public Element get(Serializable key) throws IllegalStateException, CacheException {
89 return underlyingCache.get(key);
90 }
91
92 /***
93 * {@inheritDoc}
94 */
95 public Element getQuiet(Object key) throws IllegalStateException, CacheException {
96 return underlyingCache.getQuiet(key);
97 }
98
99 /***
100 * {@inheritDoc}
101 */
102 public Element getQuiet(Serializable key) throws IllegalStateException, CacheException {
103 return underlyingCache.getQuiet(key);
104 }
105
106 /***
107 * {@inheritDoc}
108 */
109 public void put(Element element, boolean doNotNotifyCacheReplicators) throws IllegalArgumentException, IllegalStateException,
110 CacheException {
111 underlyingCache.put(element, doNotNotifyCacheReplicators);
112 }
113
114 /***
115 * {@inheritDoc}
116 */
117 public void put(Element element) throws IllegalArgumentException, IllegalStateException, CacheException {
118 underlyingCache.put(element);
119 }
120
121 /***
122 * {@inheritDoc}
123 */
124 public void putAll(Collection<Element> elements) throws IllegalArgumentException, IllegalStateException, CacheException {
125 underlyingCache.putAll(elements);
126 }
127
128 /***
129 * {@inheritDoc}
130 */
131 public void putQuiet(Element element) throws IllegalArgumentException, IllegalStateException, CacheException {
132 underlyingCache.putQuiet(element);
133 }
134
135 /***
136 * {@inheritDoc}
137 */
138 public void putWithWriter(Element element) throws IllegalArgumentException, IllegalStateException, CacheException {
139 underlyingCache.putWithWriter(element);
140 }
141
142 /***
143 * {@inheritDoc}
144 */
145 public boolean remove(Object key, boolean doNotNotifyCacheReplicators) throws IllegalStateException {
146 return underlyingCache.remove(key, doNotNotifyCacheReplicators);
147 }
148
149 /***
150 * {@inheritDoc}
151 */
152 public boolean remove(Object key) throws IllegalStateException {
153 return underlyingCache.remove(key);
154 }
155
156 /***
157 * {@inheritDoc}
158 */
159 public void removeAll(Collection<Object> keys) throws IllegalStateException {
160 underlyingCache.removeAll(keys);
161 }
162
163 /***
164 * {@inheritDoc}
165 */
166 public void removeAll(Collection<Object> keys, boolean doNotNotifyCacheReplicators) throws IllegalStateException {
167 underlyingCache.removeAll(keys, doNotNotifyCacheReplicators);
168 }
169
170 /***
171 * {@inheritDoc}
172 */
173 public boolean remove(Serializable key, boolean doNotNotifyCacheReplicators) throws IllegalStateException {
174 return underlyingCache.remove(key, doNotNotifyCacheReplicators);
175 }
176
177 /***
178 * {@inheritDoc}
179 */
180 public boolean remove(Serializable key) throws IllegalStateException {
181 return underlyingCache.remove(key);
182 }
183
184 /***
185 * {@inheritDoc}
186 */
187 public void removeAll() throws IllegalStateException, CacheException {
188 underlyingCache.removeAll();
189 }
190
191 /***
192 * {@inheritDoc}
193 */
194 public void removeAll(boolean doNotNotifyCacheReplicators) throws IllegalStateException, CacheException {
195 underlyingCache.removeAll(doNotNotifyCacheReplicators);
196 }
197
198 /***
199 * {@inheritDoc}
200 */
201 public void bootstrap() {
202 underlyingCache.bootstrap();
203 }
204
205 /***
206 * {@inheritDoc}
207 */
208 public long calculateInMemorySize() throws IllegalStateException, CacheException {
209 return underlyingCache.calculateInMemorySize();
210 }
211
212 /***
213 * {@inheritDoc}
214 */
215 public long calculateOffHeapSize() throws IllegalStateException, CacheException {
216 return underlyingCache.calculateOffHeapSize();
217 }
218
219 /***
220 * {@inheritDoc}
221 */
222 public long calculateOnDiskSize() throws IllegalStateException, CacheException {
223 return underlyingCache.calculateOnDiskSize();
224 }
225
226 /***
227 * {@inheritDoc}
228 */
229 public void clearStatistics() {
230 underlyingCache.clearStatistics();
231 }
232
233 /***
234 * {@inheritDoc}
235 */
236 public void disableDynamicFeatures() {
237 underlyingCache.disableDynamicFeatures();
238 }
239
240 /***
241 * {@inheritDoc}
242 */
243 public void dispose() throws IllegalStateException {
244 underlyingCache.dispose();
245 }
246
247 /***
248 * {@inheritDoc}
249 */
250 public void evictExpiredElements() {
251 underlyingCache.evictExpiredElements();
252 }
253
254 /***
255 * {@inheritDoc}
256 */
257 public void flush() throws IllegalStateException, CacheException {
258 underlyingCache.flush();
259 }
260
261 /***
262 * {@inheritDoc}
263 */
264 public Element getWithLoader(Object key, CacheLoader loader, Object loaderArgument) throws CacheException {
265 return underlyingCache.getWithLoader(key, loader, loaderArgument);
266 }
267
268 /***
269 * {@inheritDoc}
270 */
271 public Map getAllWithLoader(Collection keys, Object loaderArgument) throws CacheException {
272 return underlyingCache.getAllWithLoader(keys, loaderArgument);
273 }
274
275 /***
276 * {@inheritDoc}
277 */
278 public void registerCacheLoader(CacheLoader cacheLoader) {
279 underlyingCache.registerCacheLoader(cacheLoader);
280 }
281
282 /***
283 * {@inheritDoc}
284 */
285 public void unregisterCacheLoader(CacheLoader cacheLoader) {
286 underlyingCache.unregisterCacheLoader(cacheLoader);
287 }
288
289 /***
290 * {@inheritDoc}
291 */
292 public void load(Object key) throws CacheException {
293 underlyingCache.load(key);
294 }
295
296 /***
297 * {@inheritDoc}
298 */
299 public void loadAll(Collection keys, Object argument) throws CacheException {
300 underlyingCache.loadAll(keys, argument);
301 }
302
303 /***
304 * {@inheritDoc}
305 */
306 public float getAverageGetTime() {
307 return underlyingCache.getAverageGetTime();
308 }
309
310 /***
311 * {@inheritDoc}
312 */
313 public BootstrapCacheLoader getBootstrapCacheLoader() {
314 return underlyingCache.getBootstrapCacheLoader();
315 }
316
317 /***
318 * {@inheritDoc}
319 */
320 public CacheConfiguration getCacheConfiguration() {
321 return underlyingCache.getCacheConfiguration();
322 }
323
324 /***
325 * {@inheritDoc}
326 */
327 public RegisteredEventListeners getCacheEventNotificationService() {
328 return underlyingCache.getCacheEventNotificationService();
329 }
330
331 /***
332 * {@inheritDoc}
333 */
334 public CacheExceptionHandler getCacheExceptionHandler() {
335 return underlyingCache.getCacheExceptionHandler();
336 }
337
338 /***
339 * {@inheritDoc}
340 */
341 public CacheManager getCacheManager() {
342 return underlyingCache.getCacheManager();
343 }
344
345 /***
346 * {@inheritDoc}
347 */
348 public long getOffHeapStoreSize() throws IllegalStateException {
349 return underlyingCache.getOffHeapStoreSize();
350 }
351
352 /***
353 * {@inheritDoc}
354 */
355 public int getDiskStoreSize() throws IllegalStateException {
356 return underlyingCache.getDiskStoreSize();
357 }
358
359 /***
360 * {@inheritDoc}
361 */
362 public String getGuid() {
363 return underlyingCache.getGuid();
364 }
365
366 /***
367 * {@inheritDoc}
368 */
369 public Object getInternalContext() {
370 return underlyingCache.getInternalContext();
371 }
372
373 /***
374 * {@inheritDoc}
375 */
376 public List getKeys() throws IllegalStateException, CacheException {
377 return underlyingCache.getKeys();
378 }
379
380 /***
381 * {@inheritDoc}
382 */
383 public List getKeysNoDuplicateCheck() throws IllegalStateException {
384 return underlyingCache.getKeysNoDuplicateCheck();
385 }
386
387 /***
388 * {@inheritDoc}
389 */
390 public List getKeysWithExpiryCheck() throws IllegalStateException, CacheException {
391 return underlyingCache.getKeysWithExpiryCheck();
392 }
393
394 /***
395 * {@inheritDoc}
396 */
397 public LiveCacheStatistics getLiveCacheStatistics() throws IllegalStateException {
398 return underlyingCache.getLiveCacheStatistics();
399 }
400
401 /***
402 * {@inheritDoc}
403 */
404 public long getMemoryStoreSize() throws IllegalStateException {
405 return underlyingCache.getMemoryStoreSize();
406 }
407
408 /***
409 * {@inheritDoc}
410 */
411 public String getName() {
412 return underlyingCache.getName();
413 }
414
415 /***
416 * {@inheritDoc}
417 */
418 public List<CacheExtension> getRegisteredCacheExtensions() {
419 return underlyingCache.getRegisteredCacheExtensions();
420 }
421
422 /***
423 * {@inheritDoc}
424 */
425 public List<CacheLoader> getRegisteredCacheLoaders() {
426 return underlyingCache.getRegisteredCacheLoaders();
427 }
428
429 /***
430 * {@inheritDoc}
431 */
432 public CacheWriter getRegisteredCacheWriter() {
433 return underlyingCache.getRegisteredCacheWriter();
434 }
435
436 /***
437 * {@inheritDoc}
438 */
439 public SampledCacheStatistics getSampledCacheStatistics() {
440 return underlyingCache.getSampledCacheStatistics();
441 }
442
443 /***
444 * {@inheritDoc}
445 */
446 public int getSize() throws IllegalStateException, CacheException {
447 return underlyingCache.getSize();
448 }
449
450 /***
451 * {@inheritDoc}
452 */
453 public int getSizeBasedOnAccuracy(int statisticsAccuracy) throws IllegalArgumentException, IllegalStateException, CacheException {
454 return underlyingCache.getSizeBasedOnAccuracy(statisticsAccuracy);
455 }
456
457 /***
458 * {@inheritDoc}
459 */
460 public Statistics getStatistics() throws IllegalStateException {
461 return underlyingCache.getStatistics();
462 }
463
464 /***
465 * {@inheritDoc}
466 */
467 public int getStatisticsAccuracy() {
468 return underlyingCache.getStatisticsAccuracy();
469 }
470
471 /***
472 * {@inheritDoc}
473 */
474 public Status getStatus() {
475 return underlyingCache.getStatus();
476 }
477
478 /***
479 * {@inheritDoc}
480 */
481 public CacheWriterManager getWriterManager() {
482 return underlyingCache.getWriterManager();
483 }
484
485 /***
486 * {@inheritDoc}
487 */
488 public void initialise() {
489 underlyingCache.initialise();
490 }
491
492 /***
493 * {@inheritDoc}
494 *
495 * @deprecated Use {@link #isClusterBulkLoadEnabled()} instead
496 */
497 @Deprecated
498 public boolean isClusterCoherent() {
499 return underlyingCache.isClusterCoherent();
500 }
501
502 /***
503 * {@inheritDoc}
504 */
505 public boolean isDisabled() {
506 return underlyingCache.isDisabled();
507 }
508
509 /***
510 * {@inheritDoc}
511 */
512 public boolean isElementInMemory(Object key) {
513 return underlyingCache.isElementInMemory(key);
514 }
515
516 /***
517 * {@inheritDoc}
518 */
519 public boolean isElementInMemory(Serializable key) {
520 return underlyingCache.isElementInMemory(key);
521 }
522
523 /***
524 * {@inheritDoc}
525 */
526 public boolean isElementOnDisk(Object key) {
527 return underlyingCache.isElementOnDisk(key);
528 }
529
530 /***
531 * {@inheritDoc}
532 */
533 public boolean isElementOnDisk(Serializable key) {
534 return underlyingCache.isElementOnDisk(key);
535 }
536
537 /***
538 * {@inheritDoc}
539 */
540 public boolean isExpired(Element element) throws IllegalStateException, NullPointerException {
541 return underlyingCache.isExpired(element);
542 }
543
544 /***
545 * {@inheritDoc}
546 */
547 public boolean isKeyInCache(Object key) {
548 return underlyingCache.isKeyInCache(key);
549 }
550
551 /***
552 * {@inheritDoc}
553 *
554 * @deprecated Use {@link #isNodeBulkLoadEnabled()} instead
555 */
556 @Deprecated
557 public boolean isNodeCoherent() {
558 return underlyingCache.isNodeCoherent();
559 }
560
561 /***
562 * {@inheritDoc}
563 */
564 public boolean isSampledStatisticsEnabled() {
565 return underlyingCache.isSampledStatisticsEnabled();
566 }
567
568 /***
569 * {@inheritDoc}
570 */
571 public boolean isStatisticsEnabled() {
572 return underlyingCache.isStatisticsEnabled();
573 }
574
575 /***
576 * {@inheritDoc}
577 */
578 public boolean isValueInCache(Object value) {
579 return underlyingCache.isValueInCache(value);
580 }
581
582 /***
583 * {@inheritDoc}
584 */
585 public void registerCacheExtension(CacheExtension cacheExtension) {
586 underlyingCache.registerCacheExtension(cacheExtension);
587 }
588
589 /***
590 * {@inheritDoc}
591 */
592 public void registerCacheUsageListener(CacheUsageListener cacheUsageListener) throws IllegalStateException {
593 underlyingCache.registerCacheUsageListener(cacheUsageListener);
594 }
595
596 /***
597 * {@inheritDoc}
598 */
599 public void registerCacheWriter(CacheWriter cacheWriter) {
600 underlyingCache.registerCacheWriter(cacheWriter);
601 }
602
603 /***
604 * {@inheritDoc}
605 */
606 public void removeCacheUsageListener(CacheUsageListener cacheUsageListener) throws IllegalStateException {
607 underlyingCache.removeCacheUsageListener(cacheUsageListener);
608 }
609
610 /***
611 * {@inheritDoc}
612 */
613 public boolean removeQuiet(Object key) throws IllegalStateException {
614 return underlyingCache.removeQuiet(key);
615 }
616
617 /***
618 * {@inheritDoc}
619 */
620 public boolean removeQuiet(Serializable key) throws IllegalStateException {
621 return underlyingCache.removeQuiet(key);
622 }
623
624 /***
625 * {@inheritDoc}
626 */
627 public boolean removeWithWriter(Object key) throws IllegalStateException, CacheException {
628 return underlyingCache.removeWithWriter(key);
629 }
630
631 /***
632 * {@inheritDoc}
633 */
634 public void setBootstrapCacheLoader(BootstrapCacheLoader bootstrapCacheLoader) throws CacheException {
635 underlyingCache.setBootstrapCacheLoader(bootstrapCacheLoader);
636 }
637
638 /***
639 * {@inheritDoc}
640 */
641 public void setCacheExceptionHandler(CacheExceptionHandler cacheExceptionHandler) {
642 underlyingCache.setCacheExceptionHandler(cacheExceptionHandler);
643 }
644
645 /***
646 * {@inheritDoc}
647 */
648 public void setCacheManager(CacheManager cacheManager) {
649 underlyingCache.setCacheManager(cacheManager);
650 }
651
652 /***
653 * {@inheritDoc}
654 */
655 public void setDisabled(boolean disabled) {
656 underlyingCache.setDisabled(disabled);
657 }
658
659 /***
660 * {@inheritDoc}
661 */
662 public void setDiskStorePath(String diskStorePath) throws CacheException {
663 underlyingCache.setDiskStorePath(diskStorePath);
664 }
665
666 /***
667 * {@inheritDoc}
668 */
669 public void setName(String name) {
670 underlyingCache.setName(name);
671 }
672
673 /***
674 * {@inheritDoc}
675 *
676 * @deprecated Use {@link #setNodeBulkLoadEnabled(boolean)} instead
677 */
678 @Deprecated
679 public void setNodeCoherent(boolean coherent) throws UnsupportedOperationException {
680 underlyingCache.setNodeCoherent(coherent);
681 }
682
683 /***
684 * {@inheritDoc}
685 */
686 public void setSampledStatisticsEnabled(boolean enableStatistics) {
687 underlyingCache.setSampledStatisticsEnabled(enableStatistics);
688 }
689
690 /***
691 * {@inheritDoc}
692 */
693 public void setStatisticsAccuracy(int statisticsAccuracy) {
694 underlyingCache.setStatisticsAccuracy(statisticsAccuracy);
695 }
696
697 /***
698 * {@inheritDoc}
699 */
700 public void setStatisticsEnabled(boolean enableStatistics) {
701 underlyingCache.setStatisticsEnabled(enableStatistics);
702 }
703
704 /***
705 * {@inheritDoc}
706 */
707 public void setTransactionManagerLookup(TransactionManagerLookup transactionManagerLookup) {
708 underlyingCache.setTransactionManagerLookup(transactionManagerLookup);
709 }
710
711 /***
712 * {@inheritDoc}
713 */
714 public void unregisterCacheExtension(CacheExtension cacheExtension) {
715 underlyingCache.unregisterCacheExtension(cacheExtension);
716 }
717
718 /***
719 * {@inheritDoc}
720 */
721 public void unregisterCacheWriter() {
722 underlyingCache.unregisterCacheWriter();
723 }
724
725 /***
726 * {@inheritDoc}
727 *
728 * @deprecated Use {@link #waitUntilClusterBulkLoadComplete()} instead
729 */
730 @Deprecated
731 public void waitUntilClusterCoherent() throws UnsupportedOperationException {
732 underlyingCache.waitUntilClusterCoherent();
733 }
734
735 /***
736 * {@inheritDoc}
737 */
738 @Override
739 public Object clone() throws CloneNotSupportedException {
740 return super.clone();
741 }
742
743 /***
744 * {@inheritDoc}
745 */
746 public Element putIfAbsent(Element element) throws NullPointerException {
747 return underlyingCache.putIfAbsent(element);
748 }
749
750 /***
751 * {@inheritDoc}
752 */
753 public boolean removeElement(Element element) throws NullPointerException {
754 return underlyingCache.removeElement(element);
755 }
756
757 /***
758 * {@inheritDoc}
759 */
760 public boolean replace(Element old, Element element) throws NullPointerException, IllegalArgumentException {
761 return underlyingCache.replace(old, element);
762 }
763
764 /***
765 * {@inheritDoc}
766 */
767 public Element replace(Element element) throws NullPointerException {
768 return underlyingCache.replace(element);
769 }
770
771 /***
772 * {@inheritDoc}
773 *
774 * @see net.sf.ehcache.Ehcache#addPropertyChangeListener(java.beans.PropertyChangeListener)
775 */
776 public void addPropertyChangeListener(PropertyChangeListener listener) {
777 underlyingCache.addPropertyChangeListener(listener);
778 }
779
780 /***
781 * {@inheritDoc}
782 *
783 * @see net.sf.ehcache.Ehcache#removePropertyChangeListener(java.beans.PropertyChangeListener)
784 */
785 public void removePropertyChangeListener(PropertyChangeListener listener) {
786 underlyingCache.addPropertyChangeListener(listener);
787 }
788
789 /***
790 * {@inheritDoc}
791 */
792 @Override
793 public String toString() {
794 return underlyingCache.toString();
795 }
796
797 /***
798 * {@inheritDoc}
799 */
800 public Query createQuery() {
801 return underlyingCache.createQuery();
802 }
803
804 /***
805 * {@inheritDoc}
806 */
807 public <T> Attribute<T> getSearchAttribute(String attributeName) throws CacheException {
808 return underlyingCache.getSearchAttribute(attributeName);
809 }
810
811 /***
812 * {@inheritDoc}
813 */
814 public boolean isSearchable() {
815 return underlyingCache.isSearchable();
816 }
817
818 /***
819 * {@inheritDoc}
820 */
821 public long getAverageSearchTime() {
822 return underlyingCache.getAverageSearchTime();
823 }
824
825 /***
826 * {@inheritDoc}
827 */
828 public long getSearchesPerSecond() {
829 return underlyingCache.getSearchesPerSecond();
830 }
831
832 /***
833 * {@inheritDoc}
834 */
835 public void acquireReadLockOnKey(Object key) {
836 underlyingCache.acquireReadLockOnKey(key);
837 }
838
839 /***
840 * {@inheritDoc}
841 */
842 public void acquireWriteLockOnKey(Object key) {
843 underlyingCache.acquireWriteLockOnKey(key);
844 }
845
846 /***
847 * {@inheritDoc}
848 */
849 public void releaseReadLockOnKey(Object key) {
850 underlyingCache.releaseReadLockOnKey(key);
851 }
852
853 /***
854 * {@inheritDoc}
855 */
856 public void releaseWriteLockOnKey(Object key) {
857 underlyingCache.releaseWriteLockOnKey(key);
858 }
859
860 /***
861 * {@inheritDoc}
862 */
863 public boolean tryReadLockOnKey(Object key, long timeout) throws InterruptedException {
864 return underlyingCache.tryReadLockOnKey(key, timeout);
865 }
866
867 /***
868 * {@inheritDoc}
869 */
870 public boolean tryWriteLockOnKey(Object key, long timeout) throws InterruptedException {
871 return underlyingCache.tryWriteLockOnKey(key, timeout);
872 }
873
874 /***
875 * {@inheritDoc}
876 */
877 public boolean isReadLockedByCurrentThread(Object key) {
878 return underlyingCache.isReadLockedByCurrentThread(key);
879 }
880
881 /***
882 * {@inheritDoc}
883 */
884 public boolean isWriteLockedByCurrentThread(Object key) {
885 return underlyingCache.isWriteLockedByCurrentThread(key);
886 }
887
888 /***
889 * {@inheritDoc}
890 */
891 public boolean isClusterBulkLoadEnabled() throws UnsupportedOperationException, TerracottaNotRunningException {
892 return underlyingCache.isClusterBulkLoadEnabled();
893 }
894
895 /***
896 * {@inheritDoc}
897 */
898 public boolean isNodeBulkLoadEnabled() throws UnsupportedOperationException, TerracottaNotRunningException {
899 return underlyingCache.isNodeBulkLoadEnabled();
900 }
901
902 /***
903 * {@inheritDoc}
904 */
905 public void setNodeBulkLoadEnabled(boolean enabledBulkLoad) throws UnsupportedOperationException, TerracottaNotRunningException {
906 underlyingCache.setNodeBulkLoadEnabled(enabledBulkLoad);
907 }
908
909 /***
910 * {@inheritDoc}
911 */
912 public void waitUntilClusterBulkLoadComplete() throws UnsupportedOperationException, TerracottaNotRunningException {
913 underlyingCache.waitUntilClusterBulkLoadComplete();
914 }
915 }