Revision 806f96a2
Added by Andreas Müller over 3 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/sessions/SessionsViewPart.java | ||
---|---|---|
41 | 41 |
import eu.etaxonomy.taxeditor.store.CdmStore; |
42 | 42 |
import net.sf.ehcache.Cache; |
43 | 43 |
import net.sf.ehcache.CacheManager; |
44 |
import net.sf.ehcache.statistics.LiveCacheStatistics;
|
|
44 |
import net.sf.ehcache.statistics.FlatStatistics;
|
|
45 | 45 |
|
46 | 46 |
/** |
47 | 47 |
* @author cmathew |
... | ... | |
282 | 282 |
txtDefaultInMemory.setText(""); |
283 | 283 |
txtDefaultOnDisk.setText(""); |
284 | 284 |
if(defaultCache != null) { |
285 |
LiveCacheStatistics liveCacheStatistics = defaultCache.getLiveCacheStatistics();
|
|
285 |
FlatStatistics liveCacheStatistics = defaultCache.getStatistics();
|
|
286 | 286 |
txtDefaultInMemory.setText(getInMemoryStats(liveCacheStatistics)); |
287 | 287 |
txtDefaultOnDisk.setText(getOnDiskStats(liveCacheStatistics)); |
288 | 288 |
} |
... | ... | |
291 | 291 |
txtCdmModelInMemory.setText(""); |
292 | 292 |
txtCdmModelOnDisk.setText(""); |
293 | 293 |
if(cdmModelGetMethodsCache != null) { |
294 |
LiveCacheStatistics liveCacheStatistics = cdmModelGetMethodsCache.getLiveCacheStatistics();
|
|
294 |
FlatStatistics liveCacheStatistics = cdmModelGetMethodsCache.getStatistics();
|
|
295 | 295 |
txtCdmModelInMemory.setText(getInMemoryStats(liveCacheStatistics)); |
296 | 296 |
txtCdmModelOnDisk.setText(getOnDiskStats(liveCacheStatistics)); |
297 | 297 |
} |
... | ... | |
315 | 315 |
} |
316 | 316 |
} |
317 | 317 |
item.setText(0, activePrefix + sessionOwnerString); |
318 |
LiveCacheStatistics cacheStatistics = session.getCacheStatistics();
|
|
318 |
FlatStatistics cacheStatistics = session.getCacheStatistics();
|
|
319 | 319 |
item.setText(1, getInMemoryStats(cacheStatistics)); |
320 | 320 |
item.setText(2, getOnDiskStats(cacheStatistics)); |
321 | 321 |
} |
322 | 322 |
|
323 |
private String getInMemoryStats(LiveCacheStatistics statistics) {
|
|
323 |
private String getInMemoryStats(FlatStatistics statistics) {
|
|
324 | 324 |
if(statistics != null) { |
325 | 325 |
long localHeapSize = statistics.getLocalHeapSize(); |
326 | 326 |
|
... | ... | |
332 | 332 |
return ""; |
333 | 333 |
} |
334 | 334 |
|
335 |
private String getOnDiskStats(LiveCacheStatistics statistics) {
|
|
335 |
private String getOnDiskStats(FlatStatistics statistics) {
|
|
336 | 336 |
if(statistics != null) { |
337 | 337 |
long localDiskSize = statistics.getLocalDiskSize(); |
338 | 338 |
|
Also available in: Unified diff
ref #9207 , ref #9204 upgrade taxeditor.cdmlib to ehcache-2.10.6