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

« back to all changes in this revision

Viewing changes to src/main/java/net/sf/ehcache/management/sampled/SampledCacheManagerMBean.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
1
/**
2
 
 *  Copyright 2003-2010 Terracotta, Inc.
 
2
 *  Copyright Terracotta, Inc.
3
3
 *
4
4
 *  Licensed under the Apache License, Version 2.0 (the "License");
5
5
 *  you may not use this file except in compliance with the License.
16
16
 
17
17
package net.sf.ehcache.management.sampled;
18
18
 
19
 
import java.util.Map;
20
 
 
21
19
/**
22
20
 * An MBean for CacheManager exposing sampled cache usage statistics
23
21
 *
24
 
 * <p />
25
 
 *
26
22
 * @author <a href="mailto:asanoujam@terracottatech.com">Abhishek Sanoujam</a>
27
 
 * @since 1.7
28
23
 */
29
 
public interface SampledCacheManagerMBean {
 
24
public interface SampledCacheManagerMBean extends CacheManagerSampler {
30
25
    /**
31
26
     * CACHE_MANAGER_CHANGED
32
27
     */
53
48
    final String STATISTICS_ENABLED = "StatisticsEnabled";
54
49
 
55
50
    /**
56
 
     * Gets the actual name of the cache manager. This may be different from the
57
 
     * name used to register this mbean as there can potentially be multiple
58
 
     * cache managers with same name
59
 
     */
60
 
    String getName();
61
 
 
62
 
    /**
63
51
     * Gets the name used to register this mbean.
64
52
     */
65
53
    String getMBeanRegisteredName();
66
 
 
67
 
    /**
68
 
     * Gets the status attribute of the Ehcache
69
 
     *
70
 
     * @return The status value, as a String from the Status enum class
71
 
     */
72
 
    String getStatus();
73
 
 
74
 
    /**
75
 
     * Enables/disables each cache contained by this CacheManager
76
 
     *
77
 
     * @param enabled
78
 
     */
79
 
    void setEnabled(boolean enabled);
80
 
 
81
 
    /**
82
 
     * Returns if each cache is enabled.
83
 
     *
84
 
     * @return boolean indicating that each cache is enabled
85
 
     */
86
 
    boolean isEnabled();
87
 
 
88
 
    /**
89
 
     * Shuts down the CacheManager.
90
 
     * <p/>
91
 
     * If the shutdown occurs on the singleton, then the singleton is removed, so that if a singleton access method is called, a new
92
 
     * singleton will be created.
93
 
     */
94
 
    void shutdown();
95
 
 
96
 
    /**
97
 
     * Clears the contents of all caches in the CacheManager, but without
98
 
     * removing any caches.
99
 
     * <p/>
100
 
     * This method is not synchronized. It only guarantees to clear those elements in a cache at the time that the
101
 
     * {@link net.sf.ehcache.Ehcache#removeAll()} mehod on each cache is called.
102
 
     */
103
 
    void clearAll();
104
 
 
105
 
    /**
106
 
     * Gets the cache names managed by the CacheManager
107
 
     */
108
 
    String[] getCacheNames() throws IllegalStateException;
109
 
 
110
 
    /**
111
 
     * Get a map of cache name to performance metrics (hits, misses).
112
 
     *
113
 
     * @return a map of cache metrics
114
 
     */
115
 
    Map<String, long[]> getCacheMetrics();
116
 
 
117
 
    /**
118
 
     * @return aggregate hit rate
119
 
     */
120
 
    long getCacheHitRate();
121
 
 
122
 
    /**
123
 
     * @return aggregate in-memory hit rate
124
 
     */
125
 
    long getCacheInMemoryHitRate();
126
 
 
127
 
    /**
128
 
     * @return aggregate off-heap hit rate
129
 
     */
130
 
    long getCacheOffHeapHitRate();
131
 
 
132
 
    /**
133
 
     * @return aggregate on-disk hit rate
134
 
     */
135
 
    long getCacheOnDiskHitRate();
136
 
 
137
 
    /**
138
 
     * @return aggregate miss rate
139
 
     */
140
 
    long getCacheMissRate();
141
 
 
142
 
    /**
143
 
     * @return aggregate in-memory miss rate
144
 
     */
145
 
    long getCacheInMemoryMissRate();
146
 
 
147
 
    /**
148
 
     * @return aggregate off-heap miss rate
149
 
     */
150
 
    long getCacheOffHeapMissRate();
151
 
 
152
 
    /**
153
 
     * @return aggregate on-disk miss rate
154
 
     */
155
 
    long getCacheOnDiskMissRate();
156
 
 
157
 
    /**
158
 
     * @return aggregate put rate
159
 
     */
160
 
    long getCachePutRate();
161
 
 
162
 
    /**
163
 
     * @return aggregate update rate
164
 
     */
165
 
    long getCacheUpdateRate();
166
 
 
167
 
    /**
168
 
     * @return aggregate remove rate
169
 
     */
170
 
    long getCacheRemoveRate();
171
 
 
172
 
    /**
173
 
     * @return aggregate eviction rate
174
 
     */
175
 
    long getCacheEvictionRate();
176
 
 
177
 
    /**
178
 
     * @return aggregate expiration rate
179
 
     */
180
 
    long getCacheExpirationRate();
181
 
 
182
 
    /**
183
 
     * @return aggregate average get time (ms.)
184
 
     */
185
 
    float getCacheAverageGetTime();
186
 
 
187
 
    /**
188
 
     * @return if any contained caches are configured for search
189
 
     */
190
 
    boolean getSearchable();
191
 
 
192
 
    /**
193
 
     * @return aggregate search rate
194
 
     */
195
 
    long getCacheSearchRate();
196
 
 
197
 
    /**
198
 
     * @return aggregate search time
199
 
     */
200
 
    long getCacheAverageSearchTime();
201
 
 
202
 
    /**
203
 
     * Clears statistics of all caches for the associated cacheManager
204
 
     */
205
 
    void clearStatistics();
206
 
 
207
 
    /**
208
 
     * Enable statistics for each cache contained by cacheManager
209
 
     */
210
 
    void enableStatistics();
211
 
 
212
 
    /**
213
 
     * Disable statistics for each cache contained by cacheManager
214
 
     */
215
 
    void disableStatistics();
216
 
 
217
 
    /**
218
 
     * Enables/disables each contained cache
219
 
     */
220
 
    void setStatisticsEnabled(boolean enabled);
221
 
 
222
 
    /**
223
 
     * Returns true iff each contained cache has statistics enabled
224
 
     */
225
 
    boolean isStatisticsEnabled();
226
 
 
227
 
    /**
228
 
     * generateActiveConfigDeclaration
229
 
     *
230
 
     * @return CacheManager configuration as String
231
 
     */
232
 
    String generateActiveConfigDeclaration();
233
 
 
234
 
    /**
235
 
     * generateActiveConfigDeclaration
236
 
     *
237
 
     * @param cacheName
238
 
     * @return Cache configuration as String
239
 
     */
240
 
    String generateActiveConfigDeclaration(String cacheName);
241
 
 
242
 
    /**
243
 
     * Are any of the caches transactional
244
 
     * @see net.sf.ehcache.config.CacheConfiguration.TransactionalMode
245
 
     */
246
 
    boolean getTransactional();
247
 
 
248
 
    /**
249
 
     * Get the committed transactions count
250
 
     * @return the committed transactions count
251
 
     */
252
 
    long getTransactionCommittedCount();
253
 
 
254
 
    /**
255
 
     * @return aggregate Xa commit rate
256
 
     */
257
 
    long getTransactionCommitRate();
258
 
 
259
 
    /**
260
 
     * Get the rolled back transactions count
261
 
     * @return the rolled back transactions count
262
 
     */
263
 
    long getTransactionRolledBackCount();
264
 
 
265
 
    /**
266
 
     * @return aggregate Xa rollback rate
267
 
     */
268
 
    long getTransactionRollbackRate();
269
 
 
270
 
    /**
271
 
     * Get the timed out transactions count. Note that only transactions which failed to
272
 
     * commit due to a timeout are taken into account
273
 
     * @return the timed out transactions count
274
 
     */
275
 
    long getTransactionTimedOutCount();
276
 
 
277
 
    /**
278
 
     * Returns whether any caches are configured for write-behind
279
 
     */
280
 
    boolean getHasWriteBehindWriter();
281
 
 
282
 
    /**
283
 
     * Returns the total length of all write-behind queues across all caches
284
 
     * @return aggregate writer-behind queue length
285
 
     */
286
 
    long getWriterQueueLength();
287
 
 
288
 
    /**
289
 
     * Maximum elements that can be queued for processing by the write-behind writer
290
 
     * @return aggregate of the maximum elements that can be waiting to be processed
291
 
     * by the write-behind writer across all caches
292
 
     */
293
 
    int getWriterMaxQueueSize();
294
 
 
295
 
    /**
296
 
     * Maximum number of bytes of entries in the disk stores of all caches that
297
 
     * did not declare their own max size.
298
 
     *
299
 
     * @return maximum number of bytes in the disk stores of all caches that
300
 
     * did not declare their own max size.
301
 
     */
302
 
    long getMaxBytesLocalDisk();
303
 
 
304
 
    /**
305
 
     * @param maxBytes
306
 
     */
307
 
    void setMaxBytesLocalDisk(long maxBytes);
308
 
 
309
 
    /**
310
 
     * @param maxBytes
311
 
     */
312
 
    void setMaxBytesLocalDiskAsString(String maxBytes);
313
 
 
314
 
    /**
315
 
     * @return Original input for maxBytesLocalDisk
316
 
     */
317
 
    String getMaxBytesLocalDiskAsString();
318
 
 
319
 
    /**
320
 
     * Maximum number of bytes of entries in the heap memory stores of all caches that
321
 
     * did not declare their own max size.
322
 
     *
323
 
     * @return maximum number of bytes in the heap memory stores of all caches that
324
 
     * did not declare their own max size.
325
 
     */
326
 
    long getMaxBytesLocalHeap();
327
 
 
328
 
    /**
329
 
     * @return Original input for maxBytesLocalHeap
330
 
     */
331
 
    String getMaxBytesLocalHeapAsString();
332
 
 
333
 
    /**
334
 
     * @param maxBytes
335
 
     */
336
 
    void setMaxBytesLocalHeap(long maxBytes);
337
 
 
338
 
    /**
339
 
     * @param maxBytes
340
 
     */
341
 
    void setMaxBytesLocalHeapAsString(String maxBytes);
342
 
 
343
 
    /**
344
 
     * Maximum number of bytes of entries in the off-heap stores of all caches that
345
 
     * did not declare their own max size.
346
 
     *
347
 
     * @return maximum number of bytes in the off-heap stores of all caches that
348
 
     * did not declare their own max size.
349
 
     */
350
 
    long getMaxBytesLocalOffHeap();
351
 
 
352
 
    /**
353
 
     * @return Original input for maxBytesLocalOffHeap
354
 
     */
355
 
    String getMaxBytesLocalOffHeapAsString();
356
 
}
 
54
}
 
 
b'\\ No newline at end of file'