org.apache.jcs.auxiliary.lateral.socket.tcp.behavior
Interface ITCPLateralCacheAttributes

All Superinterfaces:
AuxiliaryCacheAttributes, java.lang.Cloneable, ILateralCacheAttributes, java.io.Serializable
All Known Implementing Classes:
TCPLateralCacheAttributes

public interface ITCPLateralCacheAttributes
extends ILateralCacheAttributes

This interface defines functions that are particular to the TCP Lateral Cache plugin. It extends the generic LateralCacheAttributes interface which in turn extends the AuxiliaryCache interface.

Author:
Aaron Smuts

Field Summary
 
Fields inherited from interface org.apache.jcs.auxiliary.lateral.behavior.ILateralCacheAttributes
HTTP, JAVAGROUPS, TCP, UDP, XMLRPC
 
Fields inherited from interface org.apache.jcs.auxiliary.AuxiliaryCacheAttributes
POOLED_QUEUE_TYPE, SINGLE_QUEUE_TYPE
 
Method Summary
 int getTcpListenerPort()
          Gets the tcpListenerPort attribute of the ILateralCacheAttributes object
 java.lang.String getTcpServer()
          Gets the tcpServer attribute of the ILateralCacheAttributes object
 java.lang.String getTcpServers()
          Gets the tcpServers attribute of the ILateralCacheAttributes object
 java.lang.String getUdpDiscoveryAddr()
          The address to broadcast to if UDPDiscovery is enabled.
 int getUdpDiscoveryPort()
          The port to use if UDPDiscovery is enabled.
 boolean isAllowGet()
          Is the lateral allowed to try and get from other laterals.
 boolean isAllowPut()
          Is the lateral allowed to put objects to other laterals.
 boolean isFilterRemoveByHashCode()
          Should the receiver try to match hashcodes.
 boolean isIssueRemoveOnPut()
          Should the client send a remove command rather than a put when update is called.
 boolean isUdpDiscoveryEnabled()
          Whether or not TCP laterals can try to find each other by multicast communication.
 void setAllowGet(boolean allowGet)
          Is the lateral allowed to try and get from other laterals.
 void setAllowPut(boolean allowPut)
          Is the lateral allowed to put objects to other laterals.
 void setFilterRemoveByHashCode(boolean filter)
          Should the receiver try to match hashcodes.
 void setIssueRemoveOnPut(boolean issueRemoveOnPut)
          Should the client send a remove command rather than a put when update is called.
 void setTcpListenerPort(int val)
          Sets the tcpListenerPort attribute of the ILateralCacheAttributes object
 void setTcpServer(java.lang.String val)
          Sets the tcpServer attribute of the ILateralCacheAttributes object
 void setTcpServers(java.lang.String val)
          Sets the tcpServers attribute of the ILateralCacheAttributes object
 void setUdpDiscoveryAddr(java.lang.String udpDiscoveryAddr)
          Sets the address to broadcast to if UDPDiscovery is enabled.
 void setUdpDiscoveryEnabled(boolean udpDiscoveryEnabled)
          Can setup UDP Discovery.
 void setUdpDiscoveryPort(int udpDiscoveryPort)
          Sets the port to use if UDPDiscovery is enabled.
 
Methods inherited from interface org.apache.jcs.auxiliary.lateral.behavior.ILateralCacheAttributes
getHttpListenerPort, getHttpServer, getHttpServers, getJGChannelProperties, getPutOnlyMode, getTransmissionType, getTransmissionTypeName, getUdpMulticastAddr, getUdpMulticastPort, isReceive, setHttpListenerPort, setHttpServer, setHttpServers, setJGChannelProperties, setPutOnlyMode, setReceive, setTransmissionType, setTransmissionTypeName, setUdpMulticastAddr, setUdpMulticastPort
 
Methods inherited from interface org.apache.jcs.auxiliary.AuxiliaryCacheAttributes
copy, getCacheName, getEventQueuePoolName, getEventQueueType, getEventQueueTypeFactoryCode, getName, setCacheName, setEventQueuePoolName, setEventQueueType, setName
 

Method Detail

setTcpServer

public void setTcpServer(java.lang.String val)
Sets the tcpServer attribute of the ILateralCacheAttributes object

Parameters:
val - The new tcpServer value

getTcpServer

public java.lang.String getTcpServer()
Gets the tcpServer attribute of the ILateralCacheAttributes object

Returns:
The tcpServer value

setTcpServers

public void setTcpServers(java.lang.String val)
Sets the tcpServers attribute of the ILateralCacheAttributes object

Parameters:
val - The new tcpServers value

getTcpServers

public java.lang.String getTcpServers()
Gets the tcpServers attribute of the ILateralCacheAttributes object

Returns:
The tcpServers value

setTcpListenerPort

public void setTcpListenerPort(int val)
Sets the tcpListenerPort attribute of the ILateralCacheAttributes object

Parameters:
val - The new tcpListenerPort value

getTcpListenerPort

public int getTcpListenerPort()
Gets the tcpListenerPort attribute of the ILateralCacheAttributes object

Returns:
The tcpListenerPort value

setUdpDiscoveryEnabled

public void setUdpDiscoveryEnabled(boolean udpDiscoveryEnabled)
Can setup UDP Discovery. This only works for TCp laterals right now. It allows TCP laterals to find each other by broadcasting to a multicast port.

Parameters:
udpDiscoveryEnabled - The udpDiscoveryEnabled to set.

isUdpDiscoveryEnabled

public boolean isUdpDiscoveryEnabled()
Whether or not TCP laterals can try to find each other by multicast communication.

Returns:
Returns the udpDiscoveryEnabled.

getUdpDiscoveryPort

public int getUdpDiscoveryPort()
The port to use if UDPDiscovery is enabled.

Returns:
Returns the udpDiscoveryPort.

setUdpDiscoveryPort

public void setUdpDiscoveryPort(int udpDiscoveryPort)
Sets the port to use if UDPDiscovery is enabled.

Parameters:
udpDiscoveryPort - The udpDiscoveryPort to set.

getUdpDiscoveryAddr

public java.lang.String getUdpDiscoveryAddr()
The address to broadcast to if UDPDiscovery is enabled.

Returns:
Returns the udpDiscoveryAddr.

setUdpDiscoveryAddr

public void setUdpDiscoveryAddr(java.lang.String udpDiscoveryAddr)
Sets the address to broadcast to if UDPDiscovery is enabled.

Parameters:
udpDiscoveryAddr - The udpDiscoveryAddr to set.

setAllowGet

public void setAllowGet(boolean allowGet)
Is the lateral allowed to try and get from other laterals.

This replaces the old putOnlyMode

Parameters:
allowGet -

isAllowGet

public boolean isAllowGet()
Is the lateral allowed to try and get from other laterals.

Returns:
true if the lateral will try to get

setAllowPut

public void setAllowPut(boolean allowPut)
Is the lateral allowed to put objects to other laterals.

Parameters:
allowPut -

isAllowPut

public boolean isAllowPut()
Is the lateral allowed to put objects to other laterals.

Returns:
true if puts are allowed

setIssueRemoveOnPut

public void setIssueRemoveOnPut(boolean issueRemoveOnPut)
Should the client send a remove command rather than a put when update is called. This is a client option, not a receiver option. This allows you to prevent the lateral from serializing objects.

Parameters:
issueRemoveOnPut -

isIssueRemoveOnPut

public boolean isIssueRemoveOnPut()
Should the client send a remove command rather than a put when update is called. This is a client option, not a receiver option. This allows you to prevent the lateral from serializing objects.

Returns:
true if updates will result in a remove command being sent.

isFilterRemoveByHashCode

public boolean isFilterRemoveByHashCode()
Should the receiver try to match hashcodes. If true, the receiver will see if the client supplied a hshcode. If it did, then it will try to get the item locally. If the item exists, then it will compare the hashcode. if they are the same, it will not remove. This isn't perfect since different objects can have the same hashcode, but it is unlikely of objects of the same type.

Returns:

setFilterRemoveByHashCode

public void setFilterRemoveByHashCode(boolean filter)
Should the receiver try to match hashcodes. If true, the receiver will see if the client supplied a hshcode. If it did, then it will try to get the item locally. If the item exists, then it will compare the hashcode. if they are the same, it will not remove. This isn't perfect since different objects can have the same hashcode, but it is unlikely of objects of the same type.

Parameters:
filter -


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