Package org.apache.jcs.engine.control

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


     */
    public void testHitInT1ThenT2BelowMax()
        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 testHitInT1AtMax()
        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 SKIPtestHitInT1OverMax()
        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 testPutInT1ToMax()
        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 testGetKeyArray()
        throws Exception
    {
        CompositeCacheManager cacheMgr = CompositeCacheManager.getUnconfiguredInstance();
        cacheMgr.configure( "/TestMRUCache.ccf" );
        CompositeCache cache = cacheMgr.getCache( "testGetKeyArray" );

        MRUMemoryCache mru = new MRUMemoryCache();
        mru.initialize( cache );

View Full Code Here

    {
        CompositeCacheManager hub = CompositeCacheManager.getUnconfiguredInstance();

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

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

    /**
 
View Full Code Here

        throws Exception
    {
        System.getProperties().setProperty( "MY_SYSTEM_PROPERTY_DISK_DIR", "system_set" );

        CompositeCacheManager mgr = CompositeCacheManager.getUnconfiguredInstance();
        mgr.configure( "/TestSystemProperties.ccf" );

        JCS cache = JCS.getInstance( "missing" );
        // TODO check against the actual default def
        assertEquals( "We should have used the default property for the memory size", 100, cache.getCacheAttributes()
            .getMaxObjects() );
View Full Code Here

        } else {
            cacheMgr = CompositeCacheManager.getUnconfiguredInstance();
            Properties props = new Properties();
            FileInputStream is = new FileInputStream(jcsConfigFile);
            props.load(is);
            cacheMgr.configure(props);
        }
    }

    @AfterClass
    public static void tearDownAfterClass() throws Exception {
View Full Code Here

        //props.load(/* load properties from some location defined by your app */);
        props.put("jcs.default","");
        props.put("jcs.default.cacheattributes","org.apache.jcs.engine.CompositeCacheAttributes");
        props.put("jcs.default.cacheattributes.MemoryCacheName","org.apache.jcs.engine.memory.lru.LRUMemoryCache");
        props.put("jcs.default.cacheattributes.MaxObjects",mMaxCacheSize);
        ccm.configure(props);

        termCache = JCS.getInstance("termCache");
        IElementAttributes attributes = termCache.getDefaultElementAttributes();
        //attributes.setIsEternal( true );
        attributes.setSize(5000);
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.