Package org.apache.jcs.engine.memory.util

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


    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

        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

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

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

     * <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

     * @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

    {
        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

TOP

Related Classes of org.apache.jcs.engine.memory.util.MemoryElementDescriptor

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.