public class JCSAdminBean extends Object implements JCSJMXBean
| Constructor and Description |
|---|
JCSAdminBean()
Default constructor
|
JCSAdminBean(CompositeCacheManager cacheHub)
Parameterized constructor
|
| Modifier and Type | Method and Description |
|---|---|
List<CacheRegionInfo> |
buildCacheInfo()
Builds up data on every region.
|
List<CacheElementInfo> |
buildElementInfo(String cacheName)
Builds up info about each element in a region.
|
void |
clearAllRegions()
Clears all regions in the cache.
|
void |
clearRegion(String cacheName)
Clears a particular cache region.
|
<K,V> long |
getByteCount(CompositeCache<K,V> cache)
Tries to estimate how much data is in a region.
|
long |
getByteCount(String cacheName)
Tries to estimate how much data is in a region.
|
void |
removeItem(String cacheName,
String key)
Removes a particular item from a particular region.
|
public JCSAdminBean()
public JCSAdminBean(CompositeCacheManager cacheHub)
cacheHub - the cache manager instancepublic List<CacheElementInfo> buildElementInfo(String cacheName) throws IOException
buildElementInfo in interface JCSJMXBeancacheName - IOExceptionpublic List<CacheRegionInfo> buildCacheInfo()
TODO we need a most light weight method that does not count bytes. The byte counting can really swamp a server.
buildCacheInfo in interface JCSJMXBeanpublic long getByteCount(String cacheName)
getByteCount in interface JCSJMXBeanpublic <K,V> long getByteCount(CompositeCache<K,V> cache)
public void clearAllRegions()
throws IOException
If this class is running within a remote cache server, clears all regions via the RemoteCacheServer
API, so that removes will be broadcast to client machines. Otherwise clears all regions in the cache directly via
the usual cache API.
clearAllRegions in interface JCSJMXBeanIOExceptionpublic void clearRegion(String cacheName) throws IOException
If this class is running within a remote cache server, clears the region via the RemoteCacheServer
API, so that removes will be broadcast to client machines. Otherwise clears the region directly via the usual
cache API.
clearRegion in interface JCSJMXBeanIOExceptionpublic void removeItem(String cacheName, String key) throws IOException
If this class is running within a remote cache server, removes the item via the RemoteCacheServer
API, so that removes will be broadcast to client machines. Otherwise clears the region directly via the usual
cache API.
removeItem in interface JCSJMXBeancacheName - key - IOExceptionCopyright © 2002–2022 The Apache Software Foundation. All rights reserved.