Examples of MemoryElementDescriptor


Examples of org.apache.jcs.engine.memory.util.MemoryElementDescriptor

        putCnt++;

        // Asynchronously create a MemoryElement

        ce.getElementAttributes().setLastAccessTimeNow();
        MemoryElementDescriptor old = null;
        synchronized ( this )
        {
            // TODO address double synchronization of addFirst, use write lock
            addFirst( ce );
            // this must be synchronized
View Full Code Here

Examples of org.apache.jcs.engine.memory.util.MemoryElementDescriptor

    public ICacheElement getQuiet( Serializable key )
        throws IOException
    {
        ICacheElement ce = null;

        MemoryElementDescriptor me = (MemoryElementDescriptor) map.get( key );
        if ( me != null )
        {
            if ( log.isDebugEnabled() )
            {
                log.debug( cacheName + ": LRUMemoryCache quiet hit for " + key );
View Full Code Here

Examples of org.apache.jcs.engine.memory.util.MemoryElementDescriptor

        if ( log.isDebugEnabled() )
        {
            log.debug( "getting item from cache " + cacheName + " for key " + key );
        }

        MemoryElementDescriptor me = (MemoryElementDescriptor) map.get( key );

        if ( me != null )
        {
            hitCnt++;
            if ( log.isDebugEnabled() )
View Full Code Here

Examples of org.apache.jcs.engine.memory.util.MemoryElementDescriptor

            }
        }
        else
        {
            // remove single item.
            MemoryElementDescriptor me = (MemoryElementDescriptor) map.remove( key );

            if ( me != null )
            {
                list.remove( me );
                removed = true;
View Full Code Here

Examples of org.apache.jcs.engine.memory.util.MemoryElementDescriptor

     * <p>
     * @param ce The feature to be added to the Last
     */
    protected void addLast( CacheElement ce )
    {
        MemoryElementDescriptor me = new MemoryElementDescriptor( ce );
        list.addLast( me );
        verifyCache( ce.getKey() );
    }
View Full Code Here

Examples of org.apache.jcs.engine.memory.util.MemoryElementDescriptor

     * @param ce The feature to be added to the First
     */
    private synchronized void addFirst( ICacheElement ce )
    {

        MemoryElementDescriptor me = new MemoryElementDescriptor( ce );
        list.addFirst( me );
        return;
    }
View Full Code Here

Examples of org.apache.jcs.engine.memory.util.MemoryElementDescriptor

    {
        log.debug( "dumpingMap" );
        for ( Iterator itr = map.entrySet().iterator(); itr.hasNext(); )
        {
            Map.Entry e = (Map.Entry) itr.next();
            MemoryElementDescriptor me = (MemoryElementDescriptor) e.getValue();
            log.debug( "dumpMap> key=" + e.getKey() + ", val=" + me.ce.getVal() );
        }
    }
View Full Code Here

Examples of org.apache.stratum.jcs.engine.memory.MemoryElementDescriptor

                            while ( itr.hasNext() )
                            {
                                Map.Entry entry = ( Map.Entry ) itr.next();
                                Serializable key = ( Serializable ) entry.getKey();
                                MemoryElementDescriptor me = ( MemoryElementDescriptor ) entry.getValue();
                                try
                                {
                                    if ( aux.getCacheType() == ICacheType.LATERAL_CACHE && !me.ce.getElementAttributes().getIsLateral() )
                                    {
                                        continue;
View Full Code Here

Examples of org.apache.stratum.jcs.engine.memory.MemoryElementDescriptor

                        while ( itr.hasNext() )
                        {
                            Map.Entry entry = ( Map.Entry ) itr.next();
                            Serializable key = ( Serializable ) entry.getKey();
                            MemoryElementDescriptor me = ( MemoryElementDescriptor ) entry.getValue();
                            //try {
                            // should call update
                            aux.put( key, me.ce.getVal(), me.ce.getElementAttributes() );
                            // remove this exception from the interface
                            //} catch( Exception e ) {
View Full Code Here

Examples of org.apache.stratum.jcs.engine.memory.MemoryElementDescriptor

    {

        // asynchronisly create a MemoryElement
        ce.getElementAttributes().setLastAccessTimeNow();
        addFirst( ce );
        MemoryElementDescriptor old = ( MemoryElementDescriptor ) map.put( ce.getKey(), first );

        if ( first.equals( old ) )
        {
            // the same as an existing item.
            removeNode( old );
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.