~ubuntu-branches/ubuntu/trusty/ehcache/trusty

« back to all changes in this revision

Viewing changes to src/main/java/net/sf/ehcache/management/sampled/ComprehensiveCacheSamplerImpl.java

  • Committer: Package Import Robot
  • Author(s): Emmanuel Bourg
  • Date: 2013-05-06 14:53:07 UTC
  • mfrom: (1.1.7) (2.1.8 sid)
  • Revision ID: package-import@ubuntu.com-20130506145307-v5bhw5yu70re00l3
Tags: 2.6.7-1
* Team upload.
* New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/**
 
2
 *  Copyright 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
package net.sf.ehcache.management.sampled;
 
17
 
 
18
import net.sf.ehcache.Cache;
 
19
import net.sf.ehcache.util.counter.sampled.SampledCounter;
 
20
import net.sf.ehcache.util.counter.sampled.SampledRateCounter;
 
21
 
 
22
/**
 
23
 * The default implementation of {@link ComprehensiveCacheSampler}.
 
24
 *
 
25
 * @author <a href="mailto:byoukste@terracottatech.com">byoukste</a>
 
26
 */
 
27
public class ComprehensiveCacheSamplerImpl extends CacheSamplerImpl implements ComprehensiveCacheSampler {
 
28
    private final Cache cache;
 
29
 
 
30
    /**
 
31
     * Constructor that takes a {@link Cache}
 
32
     *
 
33
     * @param cache the {@code Cache} that backs this sampler
 
34
     */
 
35
    public ComprehensiveCacheSamplerImpl(Cache cache) {
 
36
        super(cache);
 
37
        this.cache = cache;
 
38
    }
 
39
 
 
40
    /**
 
41
     * {@inheritDoc}
 
42
     */
 
43
    @Override
 
44
    public SampledCounter getCacheHitSample() {
 
45
        return cache.getCacheStatisticsSampler().getCacheHitSample();
 
46
    }
 
47
 
 
48
    /**
 
49
     * {@inheritDoc}
 
50
     */
 
51
    @Override
 
52
    public SampledCounter getCacheHitRatioSample() {
 
53
        return cache.getCacheStatisticsSampler().getCacheHitRatioSample();
 
54
    }
 
55
 
 
56
    /**
 
57
     * {@inheritDoc}
 
58
     */
 
59
    @Override
 
60
    public SampledCounter getCacheHitInMemorySample() {
 
61
        return cache.getCacheStatisticsSampler().getCacheHitInMemorySample();
 
62
    }
 
63
 
 
64
    /**
 
65
     * {@inheritDoc}
 
66
     */
 
67
    @Override
 
68
    public SampledCounter getCacheHitOffHeapSample() {
 
69
        return cache.getCacheStatisticsSampler().getCacheHitOffHeapSample();
 
70
    }
 
71
 
 
72
    /**
 
73
     * {@inheritDoc}
 
74
     */
 
75
    @Override
 
76
    public SampledCounter getCacheHitOnDiskSample() {
 
77
        return cache.getCacheStatisticsSampler().getCacheHitOnDiskSample();
 
78
    }
 
79
 
 
80
    /**
 
81
     * {@inheritDoc}
 
82
     */
 
83
    @Override
 
84
    public SampledCounter getCacheMissSample() {
 
85
        return cache.getCacheStatisticsSampler().getCacheMissSample();
 
86
    }
 
87
 
 
88
    /**
 
89
     * {@inheritDoc}
 
90
     */
 
91
    @Override
 
92
    public SampledCounter getCacheMissInMemorySample() {
 
93
        return cache.getCacheStatisticsSampler().getCacheMissInMemorySample();
 
94
    }
 
95
 
 
96
    /**
 
97
     * {@inheritDoc}
 
98
     */
 
99
    @Override
 
100
    public SampledCounter getCacheMissOffHeapSample() {
 
101
        return cache.getCacheStatisticsSampler().getCacheMissOffHeapSample();
 
102
    }
 
103
 
 
104
    /**
 
105
     * {@inheritDoc}
 
106
     */
 
107
    @Override
 
108
    public SampledCounter getCacheMissOnDiskSample() {
 
109
        return cache.getCacheStatisticsSampler().getCacheMissOnDiskSample();
 
110
    }
 
111
 
 
112
    /**
 
113
     * {@inheritDoc}
 
114
     */
 
115
    @Override
 
116
    public SampledCounter getCacheMissExpiredSample() {
 
117
        return cache.getCacheStatisticsSampler().getCacheMissExpiredSample();
 
118
    }
 
119
 
 
120
    /**
 
121
     * {@inheritDoc}
 
122
     */
 
123
    @Override
 
124
    public SampledCounter getCacheMissNotFoundSample() {
 
125
        return cache.getCacheStatisticsSampler().getCacheMissNotFoundSample();
 
126
    }
 
127
 
 
128
    /**
 
129
     * {@inheritDoc}
 
130
     */
 
131
    @Override
 
132
    public SampledCounter getCacheElementEvictedSample() {
 
133
        return cache.getCacheStatisticsSampler().getCacheElementEvictedSample();
 
134
    }
 
135
 
 
136
    /**
 
137
     * {@inheritDoc}
 
138
     */
 
139
    @Override
 
140
    public SampledCounter getCacheElementRemovedSample() {
 
141
        return cache.getCacheStatisticsSampler().getCacheElementRemovedSample();
 
142
    }
 
143
 
 
144
    /**
 
145
     * {@inheritDoc}
 
146
     */
 
147
    @Override
 
148
    public SampledCounter getCacheElementExpiredSample() {
 
149
        return cache.getCacheStatisticsSampler().getCacheElementExpiredSample();
 
150
    }
 
151
 
 
152
    /**
 
153
     * {@inheritDoc}
 
154
     */
 
155
    @Override
 
156
    public SampledCounter getCacheElementPutSample() {
 
157
        return cache.getCacheStatisticsSampler().getCacheElementPutSample();
 
158
    }
 
159
 
 
160
    /**
 
161
     * {@inheritDoc}
 
162
     */
 
163
    @Override
 
164
    public SampledCounter getCacheElementUpdatedSample() {
 
165
        return cache.getCacheStatisticsSampler().getCacheElementUpdatedSample();
 
166
    }
 
167
 
 
168
    /**
 
169
     * {@inheritDoc}
 
170
     */
 
171
    @Override
 
172
    public SampledRateCounter getAverageGetTimeSample() {
 
173
        return cache.getCacheStatisticsSampler().getAverageGetTimeSample();
 
174
    }
 
175
 
 
176
    /**
 
177
     * {@inheritDoc}
 
178
     */
 
179
    @Override
 
180
    public SampledRateCounter getAverageGetTimeNanosSample() {
 
181
        return cache.getCacheStatisticsSampler().getAverageGetTimeNanosSample();
 
182
    }
 
183
 
 
184
    /**
 
185
     * {@inheritDoc}
 
186
     */
 
187
    @Override
 
188
    public SampledRateCounter getAverageSearchTimeSample() {
 
189
        return cache.getCacheStatisticsSampler().getAverageSearchTimeSample();
 
190
    }
 
191
 
 
192
    /**
 
193
     * {@inheritDoc}
 
194
     */
 
195
    @Override
 
196
    public SampledCounter getSearchesPerSecondSample() {
 
197
        return cache.getCacheStatisticsSampler().getSearchesPerSecondSample();
 
198
    }
 
199
 
 
200
    /**
 
201
     * {@inheritDoc}
 
202
     */
 
203
    @Override
 
204
    public SampledCounter getCacheXaCommitsSample() {
 
205
        return cache.getCacheStatisticsSampler().getCacheXaCommitsSample();
 
206
    }
 
207
 
 
208
    /**
 
209
     * {@inheritDoc}
 
210
     */
 
211
    @Override
 
212
    public SampledCounter getCacheXaRollbacksSample() {
 
213
        return cache.getCacheStatisticsSampler().getCacheXaRollbacksSample();
 
214
    }
 
215
}