Tabnine Logo
JCSAdminBean.buildCacheInfo
Code IndexAdd Tabnine to your IDE (free)

How to use
buildCacheInfo
method
in
org.apache.commons.jcs.admin.JCSAdminBean

Best Java code snippets using org.apache.commons.jcs.admin.JCSAdminBean.buildCacheInfo (Showing top 5 results out of 315)

origin: stackoverflow.com

 JCSAdminBean admin = new JCSAdminBean();
LinkedList linkedList = admin.buildCacheInfo();
ListIterator iterator = linkedList.listIterator();
while (iterator.hasNext()) {
  CacheRegionInfo info = (CacheRegionInfo)iterator.next();
  CompositeCache compCache = info.getCache();
  System.out.println("Cache Name: " + compCache.getCacheName());
  System.out.println("Cache Type: " + compCache.getCacheType());
  System.out.println("Cache Misses (not found): " + compCache.getMissCountNotFound());
  System.out.println("Cache Misses (expired): " + compCache.getMissCountExpired());
  System.out.println("Cache Hits (memory): " + compCache.getHitCountRam());
  System.out.println("Cache value: " + compCache.get(propId));
origin: org.apache.commons/commons-jcs-core

context.put( "cacheInfoRecords", admin.buildCacheInfo() );
origin: org.apache.tomee.patch/commons-jcs-core

context.put( "cacheInfoRecords", admin.buildCacheInfo() );
origin: org.apache.commons/commons-jcs-core

/**
 * Create a test region and then verify that we get it from the list.
 *
 * @throws Exception
 *
 */
public void testGetRegionInfo()
  throws Exception
{
  String regionName = "myRegion";
  CacheAccess<String, String> cache = JCS.getInstance( regionName );
  cache.put( "key", "value" );
  JCSAdminBean admin = new JCSAdminBean();
  CacheRegionInfo[] regions = admin.buildCacheInfo();
  boolean foundRegion = false;
  for (CacheRegionInfo info : regions)
  {
    if ( info.getCacheName().equals( regionName ) )
    {
      foundRegion = true;
      assertTrue( "Byte count should be greater than 5.", info.getByteCount() > 5 );
      assertNotNull( "Should have stats.", info.getCacheStatistics() );
    }
  }
  assertTrue( "Should have found the region we just created.", foundRegion );
}
origin: org.apache.tomee.patch/commons-jcs-core

/**
 * Create a test region and then verify that we get it from the list.
 *
 * @throws Exception
 *
 */
public void testGetRegionInfo()
  throws Exception
{
  String regionName = "myRegion";
  CacheAccess<String, String> cache = JCS.getInstance( regionName );
  cache.put( "key", "value" );
  JCSAdminBean admin = new JCSAdminBean();
  CacheRegionInfo[] regions = admin.buildCacheInfo();
  boolean foundRegion = false;
  for (CacheRegionInfo info : regions)
  {
    if ( info.getCacheName().equals( regionName ) )
    {
      foundRegion = true;
      assertTrue( "Byte count should be greater than 5.", info.getByteCount() > 5 );
      assertNotNull( "Should have stats.", info.getCacheStatistics() );
    }
  }
  assertTrue( "Should have found the region we just created.", foundRegion );
}
org.apache.commons.jcs.adminJCSAdminBeanbuildCacheInfo

Javadoc

Builds up data on every region.

TODO we need a most light weight method that does not count bytes. The byte counting can really swamp a server.

Popular methods of JCSAdminBean

  • <init>
    Parameterized constructor
  • buildElementInfo
    Builds up info about each element in a region.
  • clearAllRegions
    Clears all regions in the cache. If this class is running within a remote cache server, clears all r
  • clearRegion
    Clears a particular cache region. If this class is running within a remote cache server, clears the
  • removeItem
    Removes a particular item from a particular region. If this class is running within a remote cache s
  • getByteCount
    Tries to estimate how much data is in a region. This is expensive. If there are any non serializable

Popular in Java

  • Finding current android device location
  • scheduleAtFixedRate (Timer)
  • addToBackStack (FragmentTransaction)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • Timer (java.util)
    Timers schedule one-shot or recurring TimerTask for execution. Prefer java.util.concurrent.Scheduled
  • Callable (java.util.concurrent)
    A task that returns a result and may throw an exception. Implementors define a single method with no
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • Join (org.hibernate.mapping)
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now