org.apache.jcs.auxiliary.lateral.javagroups
Class LateralJGSender

java.lang.Object
  extended byorg.apache.jcs.auxiliary.lateral.javagroups.LateralJGSender
All Implemented Interfaces:
IJGConstants

public class LateralJGSender
extends java.lang.Object
implements IJGConstants

This class is based on the log4j SocketAppender class. I'm using a differnet repair structure, so it is significant;y different.

Version:
$Id: LateralJGSender.java,v 1.10 2005/06/04 02:01:54 asmuts Exp $

Field Summary
 
Fields inherited from interface org.apache.jcs.auxiliary.lateral.javagroups.behavior.IJGConstants
DEFAULT_JG_GROUP_NAME, HANDLERNAME, RPC_JG_GROUP_NAME
 
Constructor Summary
LateralJGSender(ILateralCacheAttributes lca)
          Constructor for the LateralJGSender object
 
Method Summary
 void dispose(java.lang.String cache)
          Closes connection used by all LateralJGSenders for this lateral conneciton.
protected  void init()
          Create holder.
 void release()
          Description of the Method
 void remove(java.lang.String cacheName, java.io.Serializable key)
          Description of the Method
 void remove(java.lang.String cacheName, java.io.Serializable key, long requesterId)
          Description of the Method
 void removeAll(java.lang.String cacheName)
          Description of the Method
 void removeAll(java.lang.String cacheName, long requesterId)
          Description of the Method
 void send(LateralElementDescriptor led)
          Sends commands to the lateral cache listener.
 ICacheElement sendAndReceive(LateralElementDescriptor led)
          Sends commands to the lateral cache listener and gets a response.
 void update(ICacheElement item, long requesterId)
          Description of the Method
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LateralJGSender

public LateralJGSender(ILateralCacheAttributes lca)
                throws java.io.IOException
Constructor for the LateralJGSender object

Parameters:
lca -
Throws:
java.io.IOException
Method Detail

init

protected void init()
             throws java.io.IOException
Create holder.

Throws:
java.io.IOException

send

public void send(LateralElementDescriptor led)
          throws java.io.IOException
Sends commands to the lateral cache listener.

Parameters:
led -
Throws:
java.io.IOException

sendAndReceive

public ICacheElement sendAndReceive(LateralElementDescriptor led)
                             throws java.io.IOException
Sends commands to the lateral cache listener and gets a response.

Parameters:
led -
Returns:
Throws:
java.io.IOException

update

public void update(ICacheElement item,
                   long requesterId)
            throws java.io.IOException
Description of the Method

Parameters:
item -
requesterId -
Throws:
java.io.IOException

remove

public void remove(java.lang.String cacheName,
                   java.io.Serializable key)
            throws java.io.IOException
Description of the Method

Parameters:
cacheName -
key -
Throws:
java.io.IOException

remove

public void remove(java.lang.String cacheName,
                   java.io.Serializable key,
                   long requesterId)
            throws java.io.IOException
Description of the Method

Parameters:
cacheName -
key -
requesterId -
Throws:
java.io.IOException

release

public void release()
             throws java.io.IOException
Description of the Method

Throws:
java.io.IOException

dispose

public void dispose(java.lang.String cache)
             throws java.io.IOException
Closes connection used by all LateralJGSenders for this lateral conneciton. Dispose request should come into the facade and be sent to all lateral cache sevices. The lateral cache service will then call this method.

Parameters:
cache -
Throws:
java.io.IOException

removeAll

public void removeAll(java.lang.String cacheName)
               throws java.io.IOException
Description of the Method

Parameters:
cacheName -
Throws:
java.io.IOException

removeAll

public void removeAll(java.lang.String cacheName,
                      long requesterId)
               throws java.io.IOException
Description of the Method

Parameters:
cacheName -
requesterId -
Throws:
java.io.IOException


Copyright © 2002-2005 Apache Software Foundation. All Rights Reserved.