forked from dropwizard/metrics
/
InstrumentedEhcache.java
866 lines (729 loc) · 25.5 KB
/
InstrumentedEhcache.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
package com.yammer.metrics.ehcache;
import com.yammer.metrics.Metrics;
import com.yammer.metrics.core.GaugeMetric;
import com.yammer.metrics.core.TimerMetric;
import net.sf.ehcache.*;
import net.sf.ehcache.bootstrap.BootstrapCacheLoader;
import net.sf.ehcache.config.CacheConfiguration;
import net.sf.ehcache.event.RegisteredEventListeners;
import net.sf.ehcache.exceptionhandler.CacheExceptionHandler;
import net.sf.ehcache.extension.CacheExtension;
import net.sf.ehcache.loader.CacheLoader;
import net.sf.ehcache.search.Attribute;
import net.sf.ehcache.search.Query;
import net.sf.ehcache.statistics.CacheUsageListener;
import net.sf.ehcache.statistics.LiveCacheStatistics;
import net.sf.ehcache.statistics.sampled.SampledCacheStatistics;
import net.sf.ehcache.terracotta.TerracottaNotRunningException;
import net.sf.ehcache.transaction.manager.TransactionManagerLookup;
import net.sf.ehcache.writer.CacheWriter;
import net.sf.ehcache.writer.CacheWriterManager;
import java.beans.PropertyChangeListener;
import java.io.Serializable;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.concurrent.TimeUnit;
/**
* An instrumented {@link Ehcache} instance.
*/
@SuppressWarnings({"deprecation", "CloneDoesntCallSuperClone"})
public class InstrumentedEhcache implements Ehcache {
/**
* Instruments the given {@link Ehcache} instance with get and put timers
* and a set of gauges for Ehcache's built-in statistics:
* <p/>
* <table>
* <tr>
* <td>{@code hits}</td>
* <td>The number of times a requested item was found in the
* cache.</td>
* </tr>
* <tr>
* <td>{@code in-memory-hits}</td>
* <td>Number of times a requested item was found in the memory
* store.</td>
* </tr>
* <tr>
* <td>{@code off-heap-hits}</td>
* <td>Number of times a requested item was found in the off-heap
* store.</td>
* </tr>
* <tr>
* <td>{@code on-disk-hits}</td>
* <td>Number of times a requested item was found in the disk
* store.</td>
* </tr>
* <tr>
* <td>{@code misses}</td>
* <td>Number of times a requested item was not found in the
* cache.</td>
* </tr>
* <tr>
* <td>{@code in-memory-misses}</td>
* <td>Number of times a requested item was not found in the memory
* store.</td>
* </tr>
* <tr>
* <td>{@code off-heap-misses}</td>
* <td>Number of times a requested item was not found in the
* off-heap store.</td>
* </tr>
* <tr>
* <td>{@code on-disk-misses}</td>
* <td>Number of times a requested item was not found in the disk
* store.</td>
* </tr>
* <tr>
* <td>{@code objects}</td>
* <td>Number of elements stored in the cache.</td>
* </tr>
* <tr>
* <td>{@code in-memory-objects}</td>
* <td>Number of objects in the memory store.</td>
* </tr>
* <tr>
* <td>{@code off-heap-objects}</td>
* <td>Number of objects in the off-heap store.</td>
* </tr>
* <tr>
* <td>{@code on-disk-objects}</td>
* <td>Number of objects in the disk store.</td>
* </tr>
* <tr>
* <td>{@code mean-get-time}</td>
* <td>The average get time. Because ehcache support JDK1.4.2, each
* get time uses {@link System#currentTimeMillis()}, rather than
* nanoseconds. The accuracy is thus limited.</td>
* </tr>
* <tr>
* <td>{@code mean-search-time}</td>
* <td>The average execution time (in milliseconds) within the last
* sample period.</td>
* </tr>
* <tr>
* <td>{@code eviction-count}</td>
* <td>The number of cache evictions, since the cache was created,
* or statistics were cleared.</td>
* </tr>
* <tr>
* <td>{@code searches-per-second}</td>
* <td>The number of search executions that have completed in the
* last second.</td>
* </tr>
* <tr>
* <td>{@code accuracy}</td>
* <td>A human readable description of the accuracy setting. One of
* "None", "Best Effort" or "Guaranteed".</td>
* </tr>
* </table>
*
* <b>N.B.: This enables Ehcache's sampling statistics with an accuracy
* level of "none."</b>
*
* @param cache an {@link Ehcache} instance
* @return an instrumented decorator for {@code cache}
* @see Statistics
*/
public static Ehcache instrument(final Ehcache cache) {
cache.setSampledStatisticsEnabled(true);
cache.setStatisticsAccuracy(Statistics.STATISTICS_ACCURACY_NONE);
Metrics.newGauge(cache.getClass(), "hits", cache.getName(), new GaugeMetric<Long>() {
@Override
public Long value() {
return cache.getStatistics().getCacheHits();
}
});
Metrics.newGauge(cache.getClass(), "in-memory-hits", cache.getName(), new GaugeMetric<Long>() {
@Override
public Long value() {
return cache.getStatistics().getInMemoryHits();
}
});
Metrics.newGauge(cache.getClass(), "off-heap-hits", cache.getName(), new GaugeMetric<Long>() {
@Override
public Long value() {
return cache.getStatistics().getOffHeapHits();
}
});
Metrics.newGauge(cache.getClass(), "on-disk-hits", cache.getName(), new GaugeMetric<Long>() {
@Override
public Long value() {
return cache.getStatistics().getOnDiskHits();
}
});
Metrics.newGauge(cache.getClass(), "misses", cache.getName(), new GaugeMetric<Long>() {
@Override
public Long value() {
return cache.getStatistics().getCacheMisses();
}
});
Metrics.newGauge(cache.getClass(), "in-memory-misses", cache.getName(), new GaugeMetric<Long>() {
@Override
public Long value() {
return cache.getStatistics().getInMemoryMisses();
}
});
Metrics.newGauge(cache.getClass(), "off-heap-misses", cache.getName(), new GaugeMetric<Long>() {
@Override
public Long value() {
return cache.getStatistics().getOffHeapMisses();
}
});
Metrics.newGauge(cache.getClass(), "on-disk-misses", cache.getName(), new GaugeMetric<Long>() {
@Override
public Long value() {
return cache.getStatistics().getOnDiskMisses();
}
});
Metrics.newGauge(cache.getClass(), "objects", cache.getName(), new GaugeMetric<Long>() {
@Override
public Long value() {
return cache.getStatistics().getObjectCount();
}
});
Metrics.newGauge(cache.getClass(), "in-memory-objects", cache.getName(), new GaugeMetric<Long>() {
@Override
public Long value() {
return cache.getStatistics().getMemoryStoreObjectCount();
}
});
Metrics.newGauge(cache.getClass(), "off-heap-objects", cache.getName(), new GaugeMetric<Long>() {
@Override
public Long value() {
return cache.getStatistics().getOffHeapStoreObjectCount();
}
});
Metrics.newGauge(cache.getClass(), "on-disk-objects", cache.getName(), new GaugeMetric<Long>() {
@Override
public Long value() {
return cache.getStatistics().getDiskStoreObjectCount();
}
});
Metrics.newGauge(cache.getClass(), "mean-get-time", cache.getName(), new GaugeMetric<Float>() {
@Override
public Float value() {
return cache.getStatistics().getAverageGetTime();
}
});
Metrics.newGauge(cache.getClass(), "mean-search-time", cache.getName(), new GaugeMetric<Long>() {
@Override
public Long value() {
return cache.getStatistics().getAverageSearchTime();
}
});
Metrics.newGauge(cache.getClass(), "eviction-count", cache.getName(), new GaugeMetric<Long>() {
@Override
public Long value() {
return cache.getStatistics().getEvictionCount();
}
});
Metrics.newGauge(cache.getClass(), "searches-per-second", cache.getName(), new GaugeMetric<Long>() {
@Override
public Long value() {
return cache.getStatistics().getSearchesPerSecond();
}
});
Metrics.newGauge(cache.getClass(), "writer-queue-size", cache.getName(), new GaugeMetric<Long>() {
@Override
public Long value() {
return cache.getStatistics().getWriterQueueSize();
}
});
Metrics.newGauge(cache.getClass(), "accuracy", cache.getName(), new GaugeMetric<String>() {
@Override
public String value() {
return cache.getStatistics().getStatisticsAccuracyDescription();
}
});
return new InstrumentedEhcache(cache);
}
private final TimerMetric getTimer, putTimer;
private final Ehcache cache;
private InstrumentedEhcache(Ehcache cache) {
this.cache = cache;
this.getTimer = Metrics.newTimer(cache.getClass(), "get", cache.getName(), TimeUnit.MICROSECONDS, TimeUnit.SECONDS);
this.putTimer = Metrics.newTimer(cache.getClass(), "put", cache.getName(), TimeUnit.MICROSECONDS, TimeUnit.SECONDS);
}
@Override
public void unregisterCacheLoader(CacheLoader cacheLoader) {
cache.unregisterCacheLoader(cacheLoader);
}
@Override
public void acquireReadLockOnKey(Object key) {
cache.acquireReadLockOnKey(key);
}
@Override
public void acquireWriteLockOnKey(Object key) {
cache.acquireWriteLockOnKey(key);
}
@Override
public void addPropertyChangeListener(PropertyChangeListener listener) {
cache.addPropertyChangeListener(listener);
}
@Override
public void bootstrap() {
cache.bootstrap();
}
@Override
public long calculateInMemorySize() throws IllegalStateException, CacheException {
return cache.calculateInMemorySize();
}
@Override
public long calculateOffHeapSize() throws IllegalStateException, CacheException {
return cache.calculateOffHeapSize();
}
@Override
public void clearStatistics() {
cache.clearStatistics();
}
@Override
public Object clone() throws CloneNotSupportedException {
return InstrumentedEhcache.instrument((Ehcache) cache.clone());
}
@Override
public Query createQuery() {
return cache.createQuery();
}
@Override
public void disableDynamicFeatures() {
cache.disableDynamicFeatures();
}
@Override
public void dispose() throws IllegalStateException {
cache.dispose();
}
@Override
public void evictExpiredElements() {
cache.evictExpiredElements();
}
@Override
public void flush() throws IllegalStateException, CacheException {
cache.flush();
}
@Override
public Element get(Object key) throws IllegalStateException, CacheException {
final long start = System.nanoTime();
try {
return cache.get(key);
} finally {
getTimer.update(System.nanoTime() - start, TimeUnit.NANOSECONDS);
}
}
@Override
public Element get(Serializable key) throws IllegalStateException, CacheException {
final long start = System.nanoTime();
try {
return cache.get(key);
} finally {
getTimer.update(System.nanoTime() - start, TimeUnit.NANOSECONDS);
}
}
@Override
public Map getAllWithLoader(Collection keys, Object loaderArgument) throws CacheException {
return cache.getAllWithLoader(keys, loaderArgument);
}
@Override
public float getAverageGetTime() {
return cache.getAverageGetTime();
}
@Override
public long getAverageSearchTime() {
return cache.getAverageSearchTime();
}
@Override
public BootstrapCacheLoader getBootstrapCacheLoader() {
return cache.getBootstrapCacheLoader();
}
@Override
public CacheConfiguration getCacheConfiguration() {
return cache.getCacheConfiguration();
}
@Override
public RegisteredEventListeners getCacheEventNotificationService() {
return cache.getCacheEventNotificationService();
}
@Override
public CacheExceptionHandler getCacheExceptionHandler() {
return cache.getCacheExceptionHandler();
}
@Override
public CacheManager getCacheManager() {
return cache.getCacheManager();
}
@Override
public int getDiskStoreSize() throws IllegalStateException {
return cache.getDiskStoreSize();
}
@Override
public String getGuid() {
return cache.getGuid();
}
@Override
public Object getInternalContext() {
return cache.getInternalContext();
}
@Override
public List getKeys() throws IllegalStateException, CacheException {
return cache.getKeys();
}
@Override
public List getKeysNoDuplicateCheck() throws IllegalStateException {
return cache.getKeysNoDuplicateCheck();
}
@Override
public List getKeysWithExpiryCheck() throws IllegalStateException, CacheException {
return cache.getKeysWithExpiryCheck();
}
@Override
public LiveCacheStatistics getLiveCacheStatistics() throws IllegalStateException {
return cache.getLiveCacheStatistics();
}
@Override
public long getMemoryStoreSize() throws IllegalStateException {
return cache.getMemoryStoreSize();
}
@Override
public String getName() {
return cache.getName();
}
@Override
public long getOffHeapStoreSize() throws IllegalStateException {
return cache.getOffHeapStoreSize();
}
@Override
public Element getQuiet(Object key) throws IllegalStateException, CacheException {
return cache.getQuiet(key);
}
@Override
public Element getQuiet(Serializable key) throws IllegalStateException, CacheException {
return cache.getQuiet(key);
}
@Override
public List<CacheExtension> getRegisteredCacheExtensions() {
return cache.getRegisteredCacheExtensions();
}
@Override
public List<CacheLoader> getRegisteredCacheLoaders() {
return cache.getRegisteredCacheLoaders();
}
@Override
public CacheWriter getRegisteredCacheWriter() {
return cache.getRegisteredCacheWriter();
}
@Override
public SampledCacheStatistics getSampledCacheStatistics() {
return cache.getSampledCacheStatistics();
}
@Override
public <T> Attribute<T> getSearchAttribute(String attributeName) throws CacheException {
return cache.getSearchAttribute(attributeName);
}
@Override
public long getSearchesPerSecond() {
return cache.getSearchesPerSecond();
}
@Override
public int getSize() throws IllegalStateException, CacheException {
return cache.getSize();
}
@Override
public int getSizeBasedOnAccuracy(int statisticsAccuracy) throws IllegalArgumentException, IllegalStateException, CacheException {
return cache.getSizeBasedOnAccuracy(statisticsAccuracy);
}
@Override
public Statistics getStatistics() throws IllegalStateException {
return cache.getStatistics();
}
@Override
public int getStatisticsAccuracy() {
return cache.getStatisticsAccuracy();
}
@Override
public Status getStatus() {
return cache.getStatus();
}
@Override
public Element getWithLoader(Object key, CacheLoader loader, Object loaderArgument) throws CacheException {
return cache.getWithLoader(key, loader, loaderArgument);
}
@Override
public CacheWriterManager getWriterManager() {
return cache.getWriterManager();
}
@Override
public void initialise() {
cache.initialise();
}
@Override
public boolean isClusterBulkLoadEnabled() throws UnsupportedOperationException, TerracottaNotRunningException {
return cache.isClusterBulkLoadEnabled();
}
@Override
@Deprecated
public boolean isClusterCoherent() throws TerracottaNotRunningException {
return cache.isClusterCoherent();
}
@Override
public boolean isDisabled() {
return cache.isDisabled();
}
@Override
public boolean isElementInMemory(Object key) {
return cache.isElementInMemory(key);
}
@Override
public boolean isElementInMemory(Serializable key) {
return cache.isElementInMemory(key);
}
@Override
public boolean isElementOnDisk(Object key) {
return cache.isElementOnDisk(key);
}
@Override
public boolean isElementOnDisk(Serializable key) {
return cache.isElementOnDisk(key);
}
@Override
public boolean isExpired(Element element) throws IllegalStateException, NullPointerException {
return cache.isExpired(element);
}
@Override
public boolean isKeyInCache(Object key) {
return cache.isKeyInCache(key);
}
@Override
public boolean isNodeBulkLoadEnabled() throws UnsupportedOperationException, TerracottaNotRunningException {
return cache.isNodeBulkLoadEnabled();
}
@Override
@Deprecated
public boolean isNodeCoherent() throws TerracottaNotRunningException {
return cache.isNodeCoherent();
}
@Override
public boolean isReadLockedByCurrentThread(Object key) {
return cache.isReadLockedByCurrentThread(key);
}
@Override
public boolean isSampledStatisticsEnabled() {
return cache.isSampledStatisticsEnabled();
}
@Override
public boolean isSearchable() {
return cache.isSearchable();
}
@Override
public boolean isStatisticsEnabled() {
return cache.isStatisticsEnabled();
}
@Override
public boolean isValueInCache(Object value) {
return cache.isValueInCache(value);
}
@Override
public boolean isWriteLockedByCurrentThread(Object key) {
return cache.isWriteLockedByCurrentThread(key);
}
@Override
public void load(Object key) throws CacheException {
cache.load(key);
}
@Override
public void loadAll(Collection keys, Object argument) throws CacheException {
cache.loadAll(keys, argument);
}
@Override
public void put(Element element) throws IllegalArgumentException, IllegalStateException, CacheException {
final long start = System.nanoTime();
try {
cache.put(element);
} finally {
putTimer.update(System.nanoTime() - start, TimeUnit.NANOSECONDS);
}
}
@Override
public void put(Element element, boolean doNotNotifyCacheReplicators) throws IllegalArgumentException, IllegalStateException, CacheException {
final long start = System.nanoTime();
try {
cache.put(element, doNotNotifyCacheReplicators);
} finally {
putTimer.update(System.nanoTime() - start, TimeUnit.NANOSECONDS);
}
}
@Override
public Element putIfAbsent(Element element) throws NullPointerException {
final long start = System.nanoTime();
try {
return cache.putIfAbsent(element);
} finally {
putTimer.update(System.nanoTime() - start, TimeUnit.NANOSECONDS);
}
}
@Override
public void putQuiet(Element element) throws IllegalArgumentException, IllegalStateException, CacheException {
cache.putQuiet(element);
}
@Override
public void putWithWriter(Element element) throws IllegalArgumentException, IllegalStateException, CacheException {
cache.putWithWriter(element);
}
@Override
public void registerCacheExtension(CacheExtension cacheExtension) {
cache.registerCacheExtension(cacheExtension);
}
@Override
public void registerCacheLoader(CacheLoader cacheLoader) {
cache.registerCacheLoader(cacheLoader);
}
@Override
public void registerCacheUsageListener(CacheUsageListener cacheUsageListener) throws IllegalStateException {
cache.registerCacheUsageListener(cacheUsageListener);
}
@Override
public void registerCacheWriter(CacheWriter cacheWriter) {
cache.registerCacheWriter(cacheWriter);
}
@Override
public void releaseReadLockOnKey(Object key) {
cache.releaseReadLockOnKey(key);
}
@Override
public void releaseWriteLockOnKey(Object key) {
cache.releaseWriteLockOnKey(key);
}
@Override
public boolean remove(Object key) throws IllegalStateException {
return cache.remove(key);
}
@Override
public boolean remove(Object key, boolean doNotNotifyCacheReplicators) throws IllegalStateException {
return cache.remove(key, doNotNotifyCacheReplicators);
}
@Override
public boolean remove(Serializable key) throws IllegalStateException {
return cache.remove(key);
}
@Override
public boolean remove(Serializable key, boolean doNotNotifyCacheReplicators) throws IllegalStateException {
return cache.remove(key, doNotNotifyCacheReplicators);
}
@Override
public void removeAll() throws IllegalStateException, CacheException {
cache.removeAll();
}
@Override
public void removeAll(boolean doNotNotifyCacheReplicators) throws IllegalStateException, CacheException {
cache.removeAll(doNotNotifyCacheReplicators);
}
@Override
public void removeCacheUsageListener(CacheUsageListener cacheUsageListener) throws IllegalStateException {
cache.removeCacheUsageListener(cacheUsageListener);
}
@Override
public boolean removeElement(Element element) throws NullPointerException {
return cache.removeElement(element);
}
@Override
public void removePropertyChangeListener(PropertyChangeListener listener) {
cache.removePropertyChangeListener(listener);
}
@Override
public boolean removeQuiet(Object key) throws IllegalStateException {
return cache.removeQuiet(key);
}
@Override
public boolean removeQuiet(Serializable key) throws IllegalStateException {
return cache.removeQuiet(key);
}
@Override
public boolean removeWithWriter(Object key) throws IllegalStateException, CacheException {
return cache.removeWithWriter(key);
}
@Override
public Element replace(Element element) throws NullPointerException {
return cache.replace(element);
}
@Override
public boolean replace(Element old, Element element) throws NullPointerException, IllegalArgumentException {
return cache.replace(old, element);
}
@Override
public void setBootstrapCacheLoader(BootstrapCacheLoader bootstrapCacheLoader) throws CacheException {
cache.setBootstrapCacheLoader(bootstrapCacheLoader);
}
@Override
public void setCacheExceptionHandler(CacheExceptionHandler cacheExceptionHandler) {
cache.setCacheExceptionHandler(cacheExceptionHandler);
}
@Override
public void setCacheManager(CacheManager cacheManager) {
cache.setCacheManager(cacheManager);
}
@Override
public void setDisabled(boolean disabled) {
cache.setDisabled(disabled);
}
@Override
public void setDiskStorePath(String diskStorePath) throws CacheException {
cache.setDiskStorePath(diskStorePath);
}
@Override
public void setName(String name) {
cache.setName(name);
}
@Override
public void setNodeBulkLoadEnabled(boolean enabledBulkLoad) throws UnsupportedOperationException, TerracottaNotRunningException {
cache.setNodeBulkLoadEnabled(enabledBulkLoad);
}
@Override
@Deprecated
public void setNodeCoherent(boolean coherent) throws UnsupportedOperationException, TerracottaNotRunningException {
cache.setNodeCoherent(coherent);
}
@Override
public void setSampledStatisticsEnabled(boolean enableStatistics) {
cache.setSampledStatisticsEnabled(enableStatistics);
}
@Override
public void setStatisticsAccuracy(int statisticsAccuracy) {
cache.setStatisticsAccuracy(statisticsAccuracy);
}
@Override
public void setStatisticsEnabled(boolean enableStatistics) {
cache.setStatisticsEnabled(enableStatistics);
}
@Override
public void setTransactionManagerLookup(TransactionManagerLookup transactionManagerLookup) {
cache.setTransactionManagerLookup(transactionManagerLookup);
}
@Override
public String toString() {
return cache.toString();
}
@Override
public boolean tryReadLockOnKey(Object key, long timeout) throws InterruptedException {
return cache.tryReadLockOnKey(key, timeout);
}
@Override
public boolean tryWriteLockOnKey(Object key, long timeout) throws InterruptedException {
return cache.tryWriteLockOnKey(key, timeout);
}
@Override
public void unregisterCacheExtension(CacheExtension cacheExtension) {
cache.unregisterCacheExtension(cacheExtension);
}
@Override
public void unregisterCacheWriter() {
cache.unregisterCacheWriter();
}
@Override
public void waitUntilClusterBulkLoadComplete() throws UnsupportedOperationException, TerracottaNotRunningException {
cache.waitUntilClusterBulkLoadComplete();
}
@Override
@Deprecated
public void waitUntilClusterCoherent() throws UnsupportedOperationException, TerracottaNotRunningException {
cache.waitUntilClusterCoherent();
}
}