public class JCSAdminBean extends Object implements JCSJMXBean
Constructor and Description |
---|
JCSAdminBean()
Default constructor
|
JCSAdminBean(CompositeCacheManager cacheHub)
Parameterized constructor
|
Modifier and Type | Method and Description |
---|---|
CacheRegionInfo[] |
buildCacheInfo()
Builds up data on every region.
|
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> int |
getByteCount(CompositeCache<K,V> cache)
Tries to estimate how much data is in a region.
|
int |
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 CacheElementInfo[] buildElementInfo(String cacheName) throws Exception
buildElementInfo
in interface JCSJMXBean
cacheName
- Exception
public CacheRegionInfo[] buildCacheInfo() throws Exception
TODO we need a most light weight method that does not count bytes. The byte counting can really swamp a server.
buildCacheInfo
in interface JCSJMXBean
Exception
public int getByteCount(String cacheName)
getByteCount
in interface JCSJMXBean
public <K,V> int 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 JCSJMXBean
IOException
public 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 JCSJMXBean
IOException
public 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 JCSJMXBean
cacheName
- key
- IOException
Copyright © 2002–2018 The Apache Software Foundation. All rights reserved.