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

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

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

origin: org.apache.commons/commons-jcs-core

admin.clearAllRegions();
origin: org.apache.tomee.patch/commons-jcs-core

admin.clearAllRegions();
origin: org.apache.commons/commons-jcs-core

  /**
   * Add an item to a region. Call clear all and verify that it doesn't exist.
   *
   * @throws Exception
   */
  public void testClearAll()
    throws Exception
  {
    JCSAdminBean admin = new JCSAdminBean();

    String regionName = "myRegion";
    CacheAccess<String, String> cache = JCS.getInstance( regionName );

    String key = "myKey";
    cache.put( key, "value" );

    admin.clearAllRegions();

    CacheElementInfo[] elements2 = admin.buildElementInfo( regionName );
    assertEquals( "Wrong number of elements in the region after remove.", 0, elements2.length );
  }
}
origin: org.apache.tomee.patch/commons-jcs-core

  /**
   * Add an item to a region. Call clear all and verify that it doesn't exist.
   *
   * @throws Exception
   */
  public void testClearAll()
    throws Exception
  {
    JCSAdminBean admin = new JCSAdminBean();

    String regionName = "myRegion";
    CacheAccess<String, String> cache = JCS.getInstance( regionName );

    String key = "myKey";
    cache.put( key, "value" );

    admin.clearAllRegions();

    CacheElementInfo[] elements2 = admin.buildElementInfo( regionName );
    assertEquals( "Wrong number of elements in the region after remove.", 0, elements2.length );
  }
}
org.apache.commons.jcs.adminJCSAdminBeanclearAllRegions

Javadoc

Clears all regions in the cache.

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.

Popular methods of JCSAdminBean

  • <init>
    Parameterized constructor
  • buildCacheInfo
    Builds up data on every region. TODO we need a most light weight method that does not count bytes. T
  • buildElementInfo
    Builds up info about each element in a region.
  • 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

  • Making http requests using okhttp
  • findViewById (Activity)
  • getSupportFragmentManager (FragmentActivity)
  • onCreateOptionsMenu (Activity)
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • MessageFormat (java.text)
    Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
  • Github Copilot alternatives
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