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

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


    }

    /** Set the default ElementAttributes for new caches. */
    protected void setDefaultElementAttributes( Properties props )
    {
        IElementAttributes iea =
            parseElementAttributes( props, "", this.DEFAULT_REGION );
        ccMgr.setDefaultElementAttributes( iea );

        log.info( "setting defaultElementAttributes to " + iea );
    }
View Full Code Here


        if ( cca == null )
        {
            cca = parseCompositeCacheAttributes( props, regName, regionPrefix );
        }

        IElementAttributes ea = parseElementAttributes( props, regName, regionPrefix );


        ICache cache = null;
        if ( regionPrefix.equals( SYSTEM_REGION_PREFIX ) )
        {
View Full Code Here

    protected IElementAttributes
        parseElementAttributes( Properties props,
                                       String regName,
                                       String regionPrefix )
    {
        IElementAttributes eAttr;

        String attrName = regionPrefix + regName + this.ELEMENT_ATTRIBUTE_PREFIX;

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

            IElementAttributes eAttr2 = ccMgr.getDefaultElementAttributes();
            eAttr = eAttr2.copy();
        }

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

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

     * @return The Element Attributes for the group
     */
    public IElementAttributes getGroupAttributes( Object name )
        throws CacheException
    {
        IElementAttributes attr = null;
        try
        {
            attr = cacheControl.getElementAttributes( ( Serializable ) name );
        }
        catch ( Exception ioe )
View Full Code Here

     * @exception CacheException
     */
    public IElementAttributes getElementAttributes( Object name )
        throws CacheException
    {
        IElementAttributes attr = null;

        try
        {
            attr = cacheControl.getElementAttributes( ( Serializable ) name );
        }
View Full Code Here

                        p( "removed " + key );
                    }
                    else
                        if ( message.startsWith( "deattr" ) )
                    {
                        IElementAttributes ae = cache_control.getElementAttributes( );
                        p( "Default IElementAttributes " + ae );
                    }
                    else
                        if ( message.startsWith( "cloneattr" ) )
                    {
                        String numS = message.substring( message.indexOf( " " ) + 1, message.length() );
                        int num = Integer.parseInt( numS.trim() );
                        if ( numS == null )
                        {
                            p( "usage: put numbertoput" );
                        }
                        else
                        {
                            IElementAttributes attrp = new ElementAttributes();
                            long n_start = System.currentTimeMillis();
                            for ( int n = 0; n < num; n++ )
                            {
                                attrp.copy();
                            }
                            long n_end = System.currentTimeMillis();
                            p( "---cloned attr " + num + " in " + String.valueOf( n_end - n_start ) + " millis ---" );
                        }
                    }
View Full Code Here

        {
            log.debug( "put(key,value) -- updating " + key + " via super method" );
        }

        //super.put(key, val);
        IElementAttributes attrE = ( IElementAttributes ) this.attr.copy();
        try
        {
            // must make sure you call the sure here
            // updateCaches( key, val, attrE, ICache.INCLUDE_REMOTE_CACHE );
            // problem super calls back up and the last instruction gets confused
View Full Code Here

                    else
                    {
                        log.debug( "invocation is NOT Local" );
                    }
                }
                IElementAttributes attrE = ( IElementAttributes ) this.attr.copy();
                putGAN( ( GroupAttrName ) key, ce.getVal(), attrE, invocation );
            }
            catch ( IOException ioe )
            {
            }
            return;
        }
        if ( log.isDebugEnabled() )
        {
            log.debug( "update(ce,invocation) > updating " + key + " via super method" );
        }

        // TODO: what about id? not possible here?
        // GROUP ID
        //if ( key instanceof GroupId )
        //{
        //}


        IElementAttributes attrE = ( IElementAttributes ) this.attr.copy();
        try
        {
            // update should go remote if locally invoked
            boolean updateRemote = false;
            // DECIDE WHAT TO DO WITH THE LIST
View Full Code Here

                 + val + " must not be null." );
            log.error( ex );
            throw ex;
        }

        IElementAttributes attrE = ( IElementAttributes ) this.attr.copy();
        putGAN( key, val, attrE );
        return;
    }
View Full Code Here

TOP

Related Classes of org.apache.stratum.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.