Class TCPLateralCacheAttributes
java.lang.Object
org.apache.commons.jcs3.auxiliary.AbstractAuxiliaryCacheAttributes
org.apache.commons.jcs3.auxiliary.lateral.LateralCacheAttributes
org.apache.commons.jcs3.auxiliary.lateral.socket.tcp.TCPLateralCacheAttributes
- All Implemented Interfaces:
- Serializable,- Cloneable,- AuxiliaryCacheAttributes,- ILateralCacheAttributes,- ITCPLateralCacheAttributes
public class TCPLateralCacheAttributes
extends LateralCacheAttributes
implements ITCPLateralCacheAttributes
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.
- See Also:
- 
Nested Class SummaryNested classes/interfaces inherited from interface org.apache.commons.jcs3.auxiliary.lateral.behavior.ILateralCacheAttributesILateralCacheAttributes.Type
- 
Field SummaryFields inherited from interface org.apache.commons.jcs3.auxiliary.lateral.behavior.ILateralCacheAttributesDEFAULT_ZOMBIE_QUEUE_MAX_SIZE
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionintintGets the tcpListenerHost attribute of the ILateralCacheAttributes objectintGets the tcpListenerPort attribute of the ILateralCacheAttributes objectGets the tcpServer attribute of the ILateralCacheAttributes objectGets the tcpServers attribute of the ILateralCacheAttributes objectThe address to broadcast to if UDPDiscovery is enabled.intThe port to use if UDPDiscovery is enabled.intThe time-to-live for the UDP multicast packetsbooleanIs the lateral allowed to try and get from other laterals.booleanIs the lateral allowed to put objects to other laterals.booleanShould the receiver try to match hash codes.booleanShould the client send a remove command rather than a put when update is called.booleanWhether or not TCP laterals can try to find each other by multicast communication.voidsetAllowGet(boolean allowGet) Is the lateral allowed to try and get from other laterals.voidsetAllowPut(boolean allowPut) Is the lateral allowed to put objects to other laterals.voidsetFilterRemoveByHashCode(boolean filter) Should the receiver try to match hash codes.voidsetIssueRemoveOnPut(boolean issueRemoveOnPut) Should the client send a remove command rather than a put when update is called.voidsetOpenTimeOut(int openTimeOut) voidsetSocketTimeOut(int socketTimeOut) voidsetTcpListenerHost(String val) Sets the tcpListenerHost attribute of the ILateralCacheAttributes objectvoidsetTcpListenerPort(int val) Sets the tcpListenerPort attribute of the ILateralCacheAttributes objectvoidsetTcpServer(String val) Sets the tcpServer attribute of the ILateralCacheAttributes objectvoidsetTcpServers(String val) Sets the tcpServers attribute of the ILateralCacheAttributes objectvoidsetUdpDiscoveryAddr(String udpDiscoveryAddr) Sets the address to broadcast to if UDPDiscovery is enabled.voidsetUdpDiscoveryEnabled(boolean udpDiscoveryEnabled) Can setup UDP Discovery.voidsetUdpDiscoveryPort(int udpDiscoveryPort) Sets the port to use if UDPDiscovery is enabled.voidsetUdpTTL(int udpTTL) Sets the time-to-live for the UDP multicast packettoString()Used to key the instance TODO create another method for this and use toString for debugging only.Methods inherited from class org.apache.commons.jcs3.auxiliary.lateral.LateralCacheAttributesgetHttpListenerPort, getHttpServer, getHttpServers, getPutOnlyMode, getTransmissionType, getTransmissionTypeName, getUdpMulticastAddr, getUdpMulticastPort, getZombieQueueMaxSize, isReceive, setHttpListenerPort, setHttpServer, setHttpServers, setPutOnlyMode, setReceive, setTransmissionType, setTransmissionTypeName, setUdpMulticastAddr, setUdpMulticastPort, setZombieQueueMaxSizeMethods inherited from class org.apache.commons.jcs3.auxiliary.AbstractAuxiliaryCacheAttributesclone, getCacheName, getEventQueuePoolName, getEventQueueType, getName, setCacheName, setEventQueuePoolName, setEventQueueType, setNameMethods inherited from class java.lang.Objectequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.commons.jcs3.auxiliary.AuxiliaryCacheAttributesclone, getCacheName, getEventQueuePoolName, getEventQueueType, getName, setCacheName, setEventQueuePoolName, setEventQueueType, setNameMethods inherited from interface org.apache.commons.jcs3.auxiliary.lateral.behavior.ILateralCacheAttributesgetHttpListenerPort, getHttpServer, getHttpServers, getPutOnlyMode, getTransmissionType, getTransmissionTypeName, getUdpMulticastAddr, getUdpMulticastPort, getZombieQueueMaxSize, isReceive, setHttpListenerPort, setHttpServer, setHttpServers, setPutOnlyMode, setReceive, setTransmissionType, setTransmissionTypeName, setUdpMulticastAddr, setUdpMulticastPort, setZombieQueueMaxSize
- 
Constructor Details- 
TCPLateralCacheAttributespublic TCPLateralCacheAttributes()
 
- 
- 
Method Details- 
setTcpServerSets the tcpServer attribute of the ILateralCacheAttributes object- Specified by:
- setTcpServerin interface- ITCPLateralCacheAttributes
- Parameters:
- val- The new tcpServer value
 
- 
getTcpServerGets the tcpServer attribute of the ILateralCacheAttributes object- Specified by:
- getTcpServerin interface- ITCPLateralCacheAttributes
- Returns:
- The tcpServer value
 
- 
setTcpServersSets the tcpServers attribute of the ILateralCacheAttributes object- Specified by:
- setTcpServersin interface- ITCPLateralCacheAttributes
- Parameters:
- val- The new tcpServers value
 
- 
getTcpServersGets the tcpServers attribute of the ILateralCacheAttributes object- Specified by:
- getTcpServersin interface- ITCPLateralCacheAttributes
- Returns:
- The tcpServers value
 
- 
setTcpListenerPortSets the tcpListenerPort attribute of the ILateralCacheAttributes object- Specified by:
- setTcpListenerPortin interface- ITCPLateralCacheAttributes
- Parameters:
- val- The new tcpListenerPort value
 
- 
getTcpListenerPortGets the tcpListenerPort attribute of the ILateralCacheAttributes object- Specified by:
- getTcpListenerPortin interface- ITCPLateralCacheAttributes
- Returns:
- The tcpListenerPort value
 
- 
setTcpListenerHostSets the tcpListenerHost attribute of the ILateralCacheAttributes object- Specified by:
- setTcpListenerHostin interface- ITCPLateralCacheAttributes
- Parameters:
- val- The new tcpListenerHost value
 
- 
getTcpListenerHostGets the tcpListenerHost attribute of the ILateralCacheAttributes object- Specified by:
- getTcpListenerHostin interface- ITCPLateralCacheAttributes
- Returns:
- The tcpListenerHost value
 
- 
setUdpDiscoveryEnabledCan 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.- Specified by:
- setUdpDiscoveryEnabledin interface- ITCPLateralCacheAttributes
- Parameters:
- udpDiscoveryEnabled- The udpDiscoveryEnabled to set.
 
- 
isUdpDiscoveryEnabledWhether or not TCP laterals can try to find each other by multicast communication.- Specified by:
- isUdpDiscoveryEnabledin interface- ITCPLateralCacheAttributes
- Returns:
- Returns the udpDiscoveryEnabled.
 
- 
getUdpDiscoveryPortThe port to use if UDPDiscovery is enabled.- Specified by:
- getUdpDiscoveryPortin interface- ITCPLateralCacheAttributes
- Returns:
- Returns the udpDiscoveryPort.
 
- 
setUdpDiscoveryPortSets the port to use if UDPDiscovery is enabled.- Specified by:
- setUdpDiscoveryPortin interface- ITCPLateralCacheAttributes
- Parameters:
- udpDiscoveryPort- The udpDiscoveryPort to set.
 
- 
getUdpDiscoveryAddrThe address to broadcast to if UDPDiscovery is enabled.- Specified by:
- getUdpDiscoveryAddrin interface- ITCPLateralCacheAttributes
- Returns:
- Returns the udpDiscoveryAddr.
 
- 
setUdpDiscoveryAddrSets the address to broadcast to if UDPDiscovery is enabled.- Specified by:
- setUdpDiscoveryAddrin interface- ITCPLateralCacheAttributes
- Parameters:
- udpDiscoveryAddr- The udpDiscoveryAddr to set.
 
- 
getUdpTTLThe time-to-live for the UDP multicast packets- Specified by:
- getUdpTTLin interface- ITCPLateralCacheAttributes
- Returns:
- Returns the udpTTL.
- Since:
- 3.1
 
- 
setUdpTTLSets the time-to-live for the UDP multicast packet- Specified by:
- setUdpTTLin interface- ITCPLateralCacheAttributes
- Parameters:
- udpTTL- The udpTTL to set.
- Since:
- 3.1
 
- 
setAllowGetIs the lateral allowed to try and get from other laterals.This replaces the old putOnlyMode - Specified by:
- setAllowGetin interface- ITCPLateralCacheAttributes
- Parameters:
- allowGet-
 
- 
isAllowGetIs the lateral allowed to try and get from other laterals.- Specified by:
- isAllowGetin interface- ITCPLateralCacheAttributes
- Returns:
- true if the lateral will try to get
 
- 
setAllowPutIs the lateral allowed to put objects to other laterals.- Specified by:
- setAllowPutin interface- ITCPLateralCacheAttributes
- Parameters:
- allowPut-
 
- 
isAllowPutIs the lateral allowed to put objects to other laterals.- Specified by:
- isAllowPutin interface- ITCPLateralCacheAttributes
- Returns:
- true if puts are allowed
 
- 
setIssueRemoveOnPutShould 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.- Specified by:
- setIssueRemoveOnPutin interface- ITCPLateralCacheAttributes
- Parameters:
- issueRemoveOnPut-
 
- 
isIssueRemoveOnPutShould 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.- Specified by:
- isIssueRemoveOnPutin interface- ITCPLateralCacheAttributes
- Returns:
- true if updates will result in a remove command being sent.
 
- 
isFilterRemoveByHashCodeShould the receiver try to match hash codes. If true, the receiver will see if the client supplied a hash code. If it did, then it will try to get the item locally. If the item exists, then it will compare the hash code. if they are the same, it will not remove. This isn't perfect since different objects can have the same hash code, but it is unlikely of objects of the same type.- Specified by:
- isFilterRemoveByHashCodein interface- ITCPLateralCacheAttributes
- Returns:
- boolean
 
- 
setFilterRemoveByHashCodeShould the receiver try to match hash codes. If true, the receiver will see if the client supplied a hash code. If it did, then it will try to get the item locally. If the item exists, then it will compare the hash code. if they are the same, it will not remove. This isn't perfect since different objects can have the same hash code, but it is unlikely of objects of the same type.- Specified by:
- setFilterRemoveByHashCodein interface- ITCPLateralCacheAttributes
- Parameters:
- filter-
 
- 
setSocketTimeOut- Specified by:
- setSocketTimeOutin interface- ITCPLateralCacheAttributes
- Parameters:
- socketTimeOut- the socketTimeOut to set
 
- 
getSocketTimeOut- Specified by:
- getSocketTimeOutin interface- ITCPLateralCacheAttributes
- Returns:
- the socketTimeOut
 
- 
setOpenTimeOut- Specified by:
- setOpenTimeOutin interface- ITCPLateralCacheAttributes
- Parameters:
- openTimeOut- the openTimeOut to set
 
- 
getOpenTimeOut- Specified by:
- getOpenTimeOutin interface- ITCPLateralCacheAttributes
- Returns:
- the openTimeOut
 
- 
toStringUsed to key the instance TODO create another method for this and use toString for debugging only.- Overrides:
- toStringin class- LateralCacheAttributes
- Returns:
- String
 
 
-