Package org.apache.jcs.engine.control

Examples of org.apache.jcs.engine.control.CompositeCacheManager.configure()


      CompositeCacheManager ccm = CompositeCacheManager.getUnconfiguredInstance();
      StringBuffer sb = new StringBuffer();
      Properties props = new Properties();
      sb.append("conf").append(GFFinal.FILE_SEP).append("cache.ccf");
      props.load(new FileInputStream(new File(sb.toString())));
      ccm.configure(props);
      segCache = JCS.getInstance("segCache");
      logger.info("init index��info��seg cache");
    } catch (CacheException e) {
      logger.error("init segment cache is failed", e);
    } catch (IOException e) {
View Full Code Here


      cacheProps.load(new FileInputStream(confpath));
      if (cacheProps.containsKey(USE_PORTAL_CACHE_KEY) && Boolean.parseBoolean(cacheProps.getProperty(USE_PORTAL_CACHE_KEY))) {
        logDebug("Will not initialize ContentConnector Cache - Using the " + "cache configured by portalnode instead.");
      } else {
        CompositeCacheManager cManager = CompositeCacheManager.getUnconfiguredInstance();
        cManager.configure(cacheProps);
      }
    } catch (NullPointerException e) {
      if (!cacheInitFailed) {
        logError(errorMessage.toString());
        cacheInitFailed = true;
View Full Code Here

    {
        CompositeCacheManager hub = CompositeCacheManager.getUnconfiguredInstance();

        if ( prop == null )
        {
            hub.configure( "/remote.cache.properties" );
        }
        else
        {
            hub.configure( prop );
        }
View Full Code Here

        {
            hub.configure( "/remote.cache.properties" );
        }
        else
        {
            hub.configure( prop );
        }

        return hub;
    }
View Full Code Here

    /** @see Initializable#initialize */
    public void initialize() throws Exception
    {
        CompositeCacheManager instance = GroupCacheHub.getUnconfiguredInstance();

        instance.configure(
            ConfigurationConverter.getProperties( configuration ) );
    }
}
View Full Code Here

    public void runTestForRegion( String region )
        throws Exception
    {
        CompositeCacheManager cacheMgr = CompositeCacheManager
            .getUnconfiguredInstance();
        cacheMgr.configure( "/TestDiskCache.ccf" );
        CompositeCache cache = cacheMgr.getCache( region );

        LRUMemoryCache lru = new LRUMemoryCache();
        lru.initialize(cache);
View Full Code Here

     */
    public void runTestForRegion( String region )
        throws Exception
    {
        CompositeCacheManager cacheMgr = CompositeCacheManager.getUnconfiguredInstance();
        cacheMgr.configure( "/TestDiskCache.ccf" );
        CompositeCache cache = cacheMgr.getCache( region );

        LRUMemoryCache lru = new LRUMemoryCache();
        lru.initialize( cache );

View Full Code Here

        CompositeCacheManager mgr = CompositeCacheManager.getUnconfiguredInstance();

        Properties props = PropertyLoader.loadProperties( "TestSystemPropertyUsage.ccf" );

        mgr.configure( props, false );

        JCS jcs = JCS.getInstance( "someCacheNotInFile" );

        assertFalse( "System property value should not be reflected",
                     jcs.getCacheAttributes().getMaxObjects() == Integer.parseInt( props
View Full Code Here

     */
    public void testGetKeyArray()
        throws Exception
    {
        CompositeCacheManager cacheMgr = CompositeCacheManager.getUnconfiguredInstance();
        cacheMgr.configure( "/TestARCCache.ccf" );
        CompositeCache cache = cacheMgr.getCache( "testGetKeyArray" );

        ARCMemoryCache arc = new ARCMemoryCache();
        arc.initialize( cache );

View Full Code Here

     */
    public void testHitInT1BelowMax()
        throws Exception
    {
        CompositeCacheManager cacheMgr = CompositeCacheManager.getUnconfiguredInstance();
        cacheMgr.configure( "/TestARCCache.ccf" );
        CompositeCache cache = cacheMgr.getCache( "testGetKeyArray" );

        ARCMemoryCache arc = new ARCMemoryCache();
        arc.initialize( cache );

View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.