Package org.apache.jcs.auxiliary.lateral

Examples of org.apache.jcs.auxiliary.lateral.LateralElementDescriptor


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


        }

        // if we shouldn't remove on put, then put
        if ( !this.getTcpLateralCacheAttributes().isIssueRemoveOnPut() )
        {
            LateralElementDescriptor led = new LateralElementDescriptor( item );
            led.requesterId = requesterId;
            led.command = LateralElementDescriptor.UPDATE;
            sender.send( led );
        }
        // else issue a remove with the hashcode for remove check on
        // on the other end, this will be a server config option
        else
        {
            if ( log.isDebugEnabled() )
            {
                log.debug( "Issuing a remove for a put" );
            }
            // set the value to null so we don't send the item
            CacheElement ce = new CacheElement( item.getCacheName(), item.getKey(), null );
            LateralElementDescriptor led = new LateralElementDescriptor( ce );
            led.requesterId = requesterId;
            led.command = LateralElementDescriptor.REMOVE;
            led.valHashCode = item.getVal().hashCode();
            sender.send( led );
        }
View Full Code Here

     */
    public void remove( String cacheName, Serializable key, long requesterId )
        throws IOException
    {
        CacheElement ce = new CacheElement( cacheName, key, null );
        LateralElementDescriptor led = new LateralElementDescriptor( ce );
        led.requesterId = requesterId;
        led.command = LateralElementDescriptor.REMOVE;
        sender.send( led );
    }
View Full Code Here

    {
        // if get is not allowed return
        if ( this.getTcpLateralCacheAttributes().isAllowGet() )
        {
            CacheElement ce = new CacheElement( cacheName, key, null );
            LateralElementDescriptor led = new LateralElementDescriptor( ce );
            // led.requesterId = requesterId; // later
            led.command = LateralElementDescriptor.GET;
            return sender.sendAndReceive( led );
        }
        else
View Full Code Here

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

            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

     * @exception IOException
     */
    public void update( ICacheElement item, byte requesterId )
        throws IOException
    {
        LateralElementDescriptor led = new LateralElementDescriptor( item );
        led.requesterId = requesterId;
        led.command = led.UPDATE;
        send( led );
    }
View Full Code Here

     */
    public void remove( String cacheName, Serializable key, long requesterId )
        throws IOException
    {
        CacheElement ce = new CacheElement( cacheName, key, null );
        LateralElementDescriptor led = new LateralElementDescriptor( ce );
        led.requesterId = requesterId;
        led.command = led.REMOVE;
        send( led );
    }
View Full Code Here

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

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

TOP

Related Classes of org.apache.jcs.auxiliary.lateral.LateralElementDescriptor

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.