2
* Copyright Terracotta, Inc.
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
8
* http://www.apache.org/licenses/LICENSE-2.0
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.
16
package net.sf.ehcache.management.sampled;
18
import net.sf.ehcache.Cache;
19
import net.sf.ehcache.util.counter.sampled.SampledCounter;
20
import net.sf.ehcache.util.counter.sampled.SampledRateCounter;
23
* The default implementation of {@link ComprehensiveCacheSampler}.
25
* @author <a href="mailto:byoukste@terracottatech.com">byoukste</a>
27
public class ComprehensiveCacheSamplerImpl extends CacheSamplerImpl implements ComprehensiveCacheSampler {
28
private final Cache cache;
31
* Constructor that takes a {@link Cache}
33
* @param cache the {@code Cache} that backs this sampler
35
public ComprehensiveCacheSamplerImpl(Cache cache) {
44
public SampledCounter getCacheHitSample() {
45
return cache.getCacheStatisticsSampler().getCacheHitSample();
52
public SampledCounter getCacheHitRatioSample() {
53
return cache.getCacheStatisticsSampler().getCacheHitRatioSample();
60
public SampledCounter getCacheHitInMemorySample() {
61
return cache.getCacheStatisticsSampler().getCacheHitInMemorySample();
68
public SampledCounter getCacheHitOffHeapSample() {
69
return cache.getCacheStatisticsSampler().getCacheHitOffHeapSample();
76
public SampledCounter getCacheHitOnDiskSample() {
77
return cache.getCacheStatisticsSampler().getCacheHitOnDiskSample();
84
public SampledCounter getCacheMissSample() {
85
return cache.getCacheStatisticsSampler().getCacheMissSample();
92
public SampledCounter getCacheMissInMemorySample() {
93
return cache.getCacheStatisticsSampler().getCacheMissInMemorySample();
100
public SampledCounter getCacheMissOffHeapSample() {
101
return cache.getCacheStatisticsSampler().getCacheMissOffHeapSample();
108
public SampledCounter getCacheMissOnDiskSample() {
109
return cache.getCacheStatisticsSampler().getCacheMissOnDiskSample();
116
public SampledCounter getCacheMissExpiredSample() {
117
return cache.getCacheStatisticsSampler().getCacheMissExpiredSample();
124
public SampledCounter getCacheMissNotFoundSample() {
125
return cache.getCacheStatisticsSampler().getCacheMissNotFoundSample();
132
public SampledCounter getCacheElementEvictedSample() {
133
return cache.getCacheStatisticsSampler().getCacheElementEvictedSample();
140
public SampledCounter getCacheElementRemovedSample() {
141
return cache.getCacheStatisticsSampler().getCacheElementRemovedSample();
148
public SampledCounter getCacheElementExpiredSample() {
149
return cache.getCacheStatisticsSampler().getCacheElementExpiredSample();
156
public SampledCounter getCacheElementPutSample() {
157
return cache.getCacheStatisticsSampler().getCacheElementPutSample();
164
public SampledCounter getCacheElementUpdatedSample() {
165
return cache.getCacheStatisticsSampler().getCacheElementUpdatedSample();
172
public SampledRateCounter getAverageGetTimeSample() {
173
return cache.getCacheStatisticsSampler().getAverageGetTimeSample();
180
public SampledRateCounter getAverageGetTimeNanosSample() {
181
return cache.getCacheStatisticsSampler().getAverageGetTimeNanosSample();
188
public SampledRateCounter getAverageSearchTimeSample() {
189
return cache.getCacheStatisticsSampler().getAverageSearchTimeSample();
196
public SampledCounter getSearchesPerSecondSample() {
197
return cache.getCacheStatisticsSampler().getSearchesPerSecondSample();
204
public SampledCounter getCacheXaCommitsSample() {
205
return cache.getCacheStatisticsSampler().getCacheXaCommitsSample();
212
public SampledCounter getCacheXaRollbacksSample() {
213
return cache.getCacheStatisticsSampler().getCacheXaRollbacksSample();