Examples of CacheElement


Examples of org.apache.jcs.engine.CacheElement

    /** */
    public void removeAll( String cacheName, byte requesterId )
        throws IOException
    {
        CacheElement ce = new CacheElement( cacheName, "ALL", null );
        LateralElementDescriptor led = new LateralElementDescriptor( ce );
        led.requesterId = requesterId;
        led.command = led.REMOVEALL;
        sender.send( led );
    }
View Full Code Here

Examples of org.apache.jcs.engine.CacheElement

            while ( notDone )
            {
                System.out.println( "enter mesage:" );
                message = br.readLine();
                CacheElement ce = new CacheElement( "test", "test", message );
                LateralElementDescriptor led = new LateralElementDescriptor( ce );
                sender.send( led );
            }
        }
        catch ( Exception e )
View Full Code Here

Examples of org.apache.jcs.engine.CacheElement

    }

    private CacheElement readElement( Serializable key )
        throws Exception
    {
        CacheElement object = null;

        IndexedDiskElementDescriptor ded =
            ( IndexedDiskElementDescriptor ) keyHash.get( key );

        if ( ded != null )
View Full Code Here

Examples of org.apache.jcs.engine.CacheElement

            while ( itr.hasNext() )
            {
                Serializable key = ( Serializable ) itr.next();

                CacheElement tempDe = ( CacheElement ) readElement( key );
                try
                {
                    IndexedDiskElementDescriptor de =
                        dataFileTemp.appendObject( tempDe );
View Full Code Here

Examples of org.apache.jcs.engine.CacheElement

        // NOT GROUP RELATED
        try
        {
            //updateCaches( key, val, attr );
            CacheElement ce = new CacheElement( this.getCacheName(), key, val );
            ce.setElementAttributes( attr );
            super.update( ce );

        }
        catch ( IOException ioe )
        {
View Full Code Here

Examples of org.apache.jcs.engine.CacheElement

        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
            CacheElement ce = new CacheElement( this.getCacheName(), key, val );
            ce.setElementAttributes( attrE );
            super.update( ce );
        }
        catch ( IOException ioe )
        {
        }
View Full Code Here

Examples of org.apache.jcs.engine.CacheElement

        try
        {

            // update the attribute.
            //updateCaches(key, val, attrE, INCLUDE_REMOTE_CACHE);
            CacheElement ce = new CacheElement( this.getCacheName(), key, val );
            ce.setElementAttributes( attrE );

            if ( log.isDebugEnabled() )
            {
                log.debug( "putGAN( gan,val,attr,boolean invocation) > updating group attribute via super" );
            }

            super.update( ce, localOnly );

            // UPDATE THE ATTRIBUTENAME LIST, get it first
            GroupId groupId = key.groupId;
            HashSet attrNameSet = null;
            attrNameSet = (HashSet)systemGroupIdCache.get(groupId.toString());

            if ( attrNameSet == null )
            {
                attrNameSet = new HashSet();
            }
            attrNameSet.add( key.attrName );

            if ( log.isDebugEnabled() )
            {
                log.debug( "putGAN( gan,val,attr,boolean invocation) > attrNameSet.size()  = " + attrNameSet.size() );
            }

            CacheElement ceID = new CacheElement( this.getCacheName(), groupId, attrNameSet );
            ceID.setElementAttributes( attrE );

            // DO NOT SEND THE UPDATE LIST REMOTELY
            // THE ELEMENT WILL BE SENT AND THE LIST MAINTAINED REMOTELY

            systemGroupIdCache.localUpdate( ceID );
View Full Code Here

Examples of org.apache.jcs.engine.CacheElement

        {
            throw new CacheException( "createGroup(group,attr) > group " + group + " already exists " );
        }
        try
        {
            CacheElement ceID = new CacheElement( this.getCacheName(), groupId, attrNameSet );
            ceID.setElementAttributes( attrE );
            //updateCaches(groupId.key, attrNameSet, attrE );
            //super.update( ceID, EXCLUDE_REMOTE_CACHE );
            systemGroupIdCache.localUpdate( ceID );

        }
View Full Code Here

Examples of org.apache.jetspeed.cache.CacheElement

            List principalKeys = principalPropertiesCache.getKeys();
            Iterator principalKeysIter = principalKeys.iterator();
            while (principalKeysIter.hasNext())
            {
                String principalKey = (String)principalKeysIter.next();
                CacheElement propertiesElement = principalPropertiesCache.get(principalKey);
                if (propertiesElement != null)
                {
                    // scan cached principal fragment property list
                    DatabasePageManagerCachedFragmentPropertyList cachedPrincipalFragmentPropertyList = (DatabasePageManagerCachedFragmentPropertyList)propertiesElement.getContent();
                    Iterator fragmentPropertyIter = cachedPrincipalFragmentPropertyList.iterator();
                    while (fragmentPropertyIter.hasNext())
                    {
                        FragmentPropertyImpl fragmentProperty = (FragmentPropertyImpl)fragmentPropertyIter.next();
                        if (((BaseFragmentElementImpl)fragmentProperty.getFragment()).getIdentity() == fragmentId)
View Full Code Here

Examples of org.apache.jetspeed.cache.CacheElement

    public synchronized static NodeImpl cacheLookup(String path)
    {
        if (path != null)
        {
            // return valid object cached by path and oid
            CacheElement pathElement = pathCache.get(path);
            if (pathElement != null)
            {
                DatabasePageManagerCacheObject cacheObject = (DatabasePageManagerCacheObject)pathElement.getContent();
                return (NodeImpl)cacheLookup(cacheObject.getId());
            }
        }
        return null;
    }
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.