Examples of ICacheElement


Examples of org.apache.jcs.engine.behavior.ICacheElement

     *@param  localOnly
     *@return
     */
    protected ICacheElement get( Serializable key, boolean localOnly )
    {
        ICacheElement element = null;

        boolean found = false;

        if ( log.isDebugEnabled() )
        {
View Full Code Here

Examples of org.apache.jcs.engine.behavior.ICacheElement

                    while ( itr.hasNext() )
                    {
                        Map.Entry entry = ( Map.Entry ) itr.next();

                        ICacheElement ce = (ICacheElement) entry.getValue();
                        try
                        {
                            if ( aux.getCacheType() == ICacheType.LATERAL_CACHE
                                 && !ce.getElementAttributes().getIsLateral() )
                            {
                                continue;
                            }
                            aux.update( ce );
                        }
View Full Code Here

Examples of org.apache.jcs.engine.behavior.ICacheElement

                        while ( itr.hasNext() )
                        {
                            Map.Entry entry = ( Map.Entry ) itr.next();

                            ICacheElement ce = (ICacheElement) entry.getValue();

                            aux.update(ce);
                        }
                    }
                }
View Full Code Here

Examples of org.apache.jcs.engine.behavior.ICacheElement

     *@exception  IOException
     */
    public ICacheElement getQuiet( Serializable key )
        throws IOException
    {
        ICacheElement ce = null;

        MemoryElementDescriptor me = (MemoryElementDescriptor) map.get(key);
        if ( me != null )
        {
            if ( log.isDebugEnabled() )
View Full Code Here

Examples of org.apache.jcs.engine.behavior.ICacheElement

     *@exception  IOException
     */
    public ICacheElement get( Serializable key )
        throws IOException
    {
        ICacheElement ce = null;

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

        MemoryElementDescriptor me = (MemoryElementDescriptor)map.get(key);
       
        if ( me != null )
        {
            if ( log.isDebugEnabled() )
            {
                log.debug( cacheName + ": LRUMemoryCache hit for " + key );
            }
           
            ce = me.ce;
           
            ce.getElementAttributes().setLastAccessTimeNow();
            makeFirst( me );
        }
        else
        {
            log.debug( cacheName + ": LRUMemoryCache miss for " + key );
View Full Code Here

Examples of org.apache.jcs.engine.behavior.ICacheElement

        {
            cacheMgr = CompositeCacheManager.getInstance();
            log.debug( "cacheMgr was null in LateralCacheServlet" );
        }

        ICacheElement item = null;

        try
        {

            // Create the ObjectInputStream with
            // the Request InputStream.
            ObjectInputStream ois =
                new ObjectInputStream( request.getInputStream() );

            log.debug( "after getting input stream and before reading it" );

            // READ POLLOBJ
            item = ( ICacheElement ) ois.readObject();
            ois.close();

        }
        catch ( Exception e )
        {
            log.error( e );
        }

        if ( item == null )
        {
            log.debug( "item is null in LateralCacheServlet" );
        }
        else
        {
            String hashtableName = item.getCacheName();
            Serializable key = item.getKey();
            Serializable val = item.getVal();

            log.debug( "item read in = " + item );
            log.debug( "item.getKey = " + item.getKey() );

            CompositeCache cache = ( CompositeCache ) cacheMgr.getCache( hashtableName );
            try
            {
                // need to set as from lateral
View Full Code Here

Examples of org.apache.jcs.engine.behavior.ICacheElement

     * @exception IOException
     */
    public ICacheElement sendAndReceive( LateralElementDescriptor led )
        throws IOException
    {
        ICacheElement ice = null;

        log.debug( "sendAndReceive led" );

        if ( led == null )
        {
View Full Code Here

Examples of org.apache.jcs.engine.behavior.ICacheElement

    /** Returns null. The performace costs are too great. */
    public ICacheElement get( Serializable key )
        throws IOException
    {
        ICacheElement obj = null;

        if ( cattr.getPutOnlyMode() )
        {
            return null;
        }
View Full Code Here

Examples of org.apache.jcs.engine.behavior.ICacheElement

    {
        try
        {
            long start = System.currentTimeMillis();
            //if ( running ) {
            ICacheElement cb = new CacheElement( hashtableName, key, val );
            log.debug( "key = " + key );
            String result = sendCache( cb );
            sleep( 100 );
            running = false;
            long end = System.currentTimeMillis();
View Full Code Here

Examples of org.apache.jcs.engine.behavior.ICacheElement

        if ( !isAlive )
        {
            return null;
        }

        ICacheElement obj = null;

        byte[] data = null;
        try
        {
            String sqlS = "select ELEMENT from " + cacheName + " where KEY = ?";
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.