java.lang.Object
org.apache.commons.jcs3.auxiliary.lateral.socket.tcp.LateralTCPSender

public class LateralTCPSender extends Object
This class is based on the log4j SocketAppender class. I'm using a different repair structure, so it is significantly different.
  • Constructor Details

  • Method Details

    • init

      protected void init(String host, int port) throws IOException
      Creates a connection to a TCP server.

      Parameters:
      host -
      port -
      Throws:
      IOException
    • send

      public <K, V> void send(LateralElementDescriptor<K,V> led) throws IOException
      Sends commands to the lateral cache listener.

      Parameters:
      led -
      Throws:
      IOException
    • sendAndReceive

      public <K, V> Object sendAndReceive(LateralElementDescriptor<K,V> led) throws IOException
      Sends commands to the lateral cache listener and gets a response. I'm afraid that we could get into a pretty bad blocking situation here. This needs work. I just wanted to get some form of get working. However, get is not recommended for performance reasons. If you have 10 laterals, then you have to make 10 failed gets to find out none of the caches have the item.

      Parameters:
      led -
      Returns:
      ICacheElement
      Throws:
      IOException
    • dispose

      public void dispose() throws IOException
      Closes connection used by all LateralTCPSenders for this lateral connection. Dispose request should come into the facade and be sent to all lateral cache services. The lateral cache service will then call this method.

      Throws:
      IOException