Package org.apache.stratum.jcs.engine.behavior

Examples of org.apache.stratum.jcs.engine.behavior.ICompositeCacheAttributes


    }

    /** Set the default CompositeCacheAttributes for new caches. */
    protected void setDefaultCompositeCacheAttributes( Properties props )
    {
        ICompositeCacheAttributes icca =
            parseCompositeCacheAttributes( props, "", this.DEFAULT_REGION );
        ccMgr.setDefaultCacheAttributes( icca );

        log.info( "setting defaultCompositeCacheAttributes to " + icca );
    }
View Full Code Here


    protected ICompositeCacheAttributes
        parseCompositeCacheAttributes( Properties props,
                                       String regName,
                                       String regionPrefix )
    {
        ICompositeCacheAttributes ccAttr;

        String attrName = regionPrefix + regName + CACHE_ATTRIBUTE_PREFIX;

        // auxFactory was not previously initialized.
        //String prefix = regionPrefix + regName + ATTRIBUTE_PREFIX;
        ccAttr = ( ICompositeCacheAttributes ) OptionConverter.instantiateByKey( props, attrName,
            org.apache.stratum.jcs.engine.behavior.ICompositeCacheAttributes.class,
            null );
        if ( ccAttr == null )
        {
            log.warn( "Could not instantiate ccAttr named '" + attrName +
                "', using defaults." );

            ICompositeCacheAttributes ccAttr2 = ccMgr.getDefaultCacheAttributes();
            ccAttr = ccAttr2.copy();
        }

        log.debug( "Parsing options for '" + attrName + "'" );

        PropertySetter.setProperties( ccAttr, props, attrName + "." );
View Full Code Here

     */
    public ICompositeCacheAttributes copy()
    {
        try
        {
            ICompositeCacheAttributes cattr = ( CompositeCacheAttributes ) this.clone();
            //System.out.println( "cattr = " + cattr );
            return cattr;
        }
        catch ( Exception e )
        {
View Full Code Here

        zipListCache = cacheMgr.getCache( "zipListCache" );

        // I want to modify the defualts so I will get the
        // cattr and modify it.  Otherwise I could call
        // zipToCityCache = cacheMgr.getCache( "zipToCityCache" );
        ICompositeCacheAttributes cattr = cacheMgr.getDefaultCacheAttributes();
        cattr.setMaxObjects( 10000 );
        zipToCityCache = cacheMgr.getCache( "zipToCityCache", cattr );
        // get another copy of the cattr
        cattr = cacheMgr.getDefaultCacheAttributes();
        cattr.setMaxObjects( 10000 );
        try
        {
            cityGroupCache = GroupCacheAccess.getGroupAccess( "cityGroupCache", cattr );
        }
        catch ( Exception e )
View Full Code Here

TOP

Related Classes of org.apache.stratum.jcs.engine.behavior.ICompositeCacheAttributes

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.