Reputation: 1447
I am configuring my caches from an ehcache.xml
file, among other configurations I set there the maxBytesLocalHeap
for all the caches.
I also have a web interface where I have to show all the available caches, their actual size and their maximum size.
I am able to get the global maxBytesLocalHeap
but I can not find a way to get this for each cache. Is there any method to do this? (Or an workaround if is not possible to get it via Ehcache public APIs)
PS: My caches are using only on-heap memory.
Upvotes: 0
Views: 304
Reputation: 28
@Flowryn..you can get the each & every detail about each Cache using StatisticsGateway Class...Use cache.getStatistics().getLocalHeapSizeInBytes() I addition to above there are many Methods which u can use to show on your web interface...
Let me know if you need any clarification on it.
Upvotes: 1