Package org.apache.jcs.engine.behavior

Examples of org.apache.jcs.engine.behavior.IElementAttributes


        long maxIdleTime = 8765;
        ca.setMaxMemoryIdleTimeSeconds( maxIdleTime );

        long maxLife = 9876;
        IElementAttributes attr = new ElementAttributes();
        attr.setMaxLifeSeconds( maxLife );

        CacheAccess access = CacheAccess.defineRegion( "testRegionDefinitonWithAttributes", ca, attr );
        assertNotNull( "We should have an access class", access );

        ICompositeCacheAttributes ca2 = access.getCacheAttributes();
View Full Code Here


    public void start() {
        try
        {
            jcs = JCS.getInstance( "myregion" );
            //         jcs.getDefaultElementAttributes returns a copy not a reference
            IElementAttributes attributes = jcs.getDefaultElementAttributes();
            //         set some special value
            attributes.setIsEternal( true );
            jcs.put( "key", "data", attributes );
        }
        catch(Exception exception) {
            exception.printStackTrace();
        }
View Full Code Here

        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);
        termCache.setDefaultElementAttributes( attributes );
    }
View Full Code Here

TOP

Related Classes of org.apache.jcs.engine.behavior.IElementAttributes

Copyright © 2018 www.massapicom. 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.