|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.catalina.cluster.tcp.ClusterReceiverBase
FIXME i18n log messages
Field Summary | |
protected boolean |
doListen
|
protected boolean |
doReceivedProcessingStats
doProcessingStats |
protected static org.apache.commons.logging.Log |
log
|
protected long |
maxReceivedProcessingTime
max proessingTime |
protected long |
minReceivedProcessingTime
min proessingTime |
protected long |
receivedProcessingTime
proessingTime |
protected StringManager |
sm
The string manager for this package. |
protected long |
totalReceivedBytes
total bytes to recevied |
Constructor Summary | |
ClusterReceiverBase()
|
Method Summary | |
protected void |
addReceivedProcessingStats(long startTime)
Add receiver processing stats times |
protected ClusterMessage |
deserialize(ClusterData data)
deserialize the receieve cluster message |
double |
getAvgReceivedProcessingTime()
|
long |
getAvgTotalReceivedBytes()
|
java.net.InetAddress |
getBind()
|
CatalinaCluster |
getCatalinaCluster()
get Callback. |
java.lang.String |
getHost()
get the listing ip interface |
long |
getLastChecked()
|
long |
getMaxReceivedProcessingTime()
|
long |
getMinReceivedProcessingTime()
|
long |
getNrOfMsgsReceived()
|
javax.management.ObjectName |
getObjectName()
Receiver ObjectName |
int |
getPort()
get the listing ip port |
long |
getReceivedProcessingTime()
|
long |
getReceivedTime()
|
int |
getRxBufSize()
|
int |
getSoLingerTime()
|
int |
getSoTrafficClass()
|
java.lang.String |
getTcpListenAddress()
get tcp listen recevier ip address |
int |
getTcpListenPort()
|
int |
getTimeout()
|
long |
getTotalReceivedBytes()
|
int |
getTxBufSize()
|
boolean |
isCompress()
|
boolean |
isDoListen()
|
boolean |
isDoReceivedProcessingStats()
|
boolean |
isOoBInline()
|
boolean |
isSendAck()
Send ACK to sender |
boolean |
isSoKeepAlive()
|
boolean |
isSoLingerOn()
|
boolean |
isSoReuseAddress()
|
boolean |
isTcpNoDelay()
|
protected abstract void |
listen()
Start Listener |
void |
messageDataReceived(ClusterData data)
receiver Message from other node. |
protected void |
registerReceiverMBean()
Register Receiver MBean <domain>:type=ClusterReceiver,host=<host> |
void |
resetStatistics()
Reset sender statistics |
void |
run()
Start thread and listen |
void |
sendAck()
send ack |
void |
setBind(java.net.InetAddress bind)
|
void |
setCatalinaCluster(CatalinaCluster cluster)
set callback. |
void |
setCompress(boolean compressMessageData)
|
void |
setDoReceivedProcessingStats(boolean doReceiverProcessingStats)
|
void |
setObjectName(javax.management.ObjectName name)
set Receiver ObjectName |
void |
setOoBInline(boolean ooBInline)
|
void |
setRxBufSize(int rxBufSize)
|
void |
setSendAck(boolean sendAck)
set ack mode or not! |
void |
setSoKeepAlive(boolean soKeepAlive)
|
void |
setSoLingerOn(boolean soLingerOn)
|
void |
setSoLingerTime(int soLingerTime)
|
void |
setSoReuseAddress(boolean soReuseAddress)
|
void |
setSoTrafficClass(int soTrafficClass)
|
void |
setTcpListenAddress(java.lang.String tcpListenAddress)
Set TCP listen ip address. |
void |
setTcpListenPort(int tcpListenPort)
|
void |
setTcpNoDelay(boolean tcpNoDelay)
|
void |
setTimeout(int timeout)
|
void |
setTxBufSize(int txBufSize)
|
void |
start()
start cluster receiver |
void |
stop()
Stop accept |
protected abstract void |
stopListening()
stop Listener sockets |
protected void |
unregisterRecevierMBean()
UnRegister Recevier MBean <domain>:type=ClusterReceiver,host=<host> |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static org.apache.commons.logging.Log log
protected StringManager sm
protected boolean doListen
protected long totalReceivedBytes
protected boolean doReceivedProcessingStats
protected long receivedProcessingTime
protected long minReceivedProcessingTime
protected long maxReceivedProcessingTime
Constructor Detail |
public ClusterReceiverBase()
Method Detail |
public boolean isOoBInline()
public void setOoBInline(boolean ooBInline)
ooBInline
- the ooBInline to setpublic int getRxBufSize()
public void setRxBufSize(int rxBufSize)
rxBufSize
- the rxBufSize to setpublic boolean isSoKeepAlive()
public void setSoKeepAlive(boolean soKeepAlive)
soKeepAlive
- the soKeepAlive to setpublic boolean isSoLingerOn()
public void setSoLingerOn(boolean soLingerOn)
soLingerOn
- the soLingerOn to setpublic int getSoLingerTime()
public void setSoLingerTime(int soLingerTime)
soLingerTime
- the soLingerTime to setpublic boolean isSoReuseAddress()
public void setSoReuseAddress(boolean soReuseAddress)
soReuseAddress
- the soReuseAddress to setpublic int getSoTrafficClass()
public void setSoTrafficClass(int soTrafficClass)
soTrafficClass
- the soTrafficClass to setpublic boolean isTcpNoDelay()
public void setTcpNoDelay(boolean tcpNoDelay)
tcpNoDelay
- the tcpNoDelay to setpublic int getTimeout()
public void setTimeout(int timeout)
timeout
- the timeout to setpublic int getTxBufSize()
public void setTxBufSize(int txBufSize)
txBufSize
- the txBufSize to setpublic boolean isDoListen()
public java.net.InetAddress getBind()
public void setBind(java.net.InetAddress bind)
bind
- The bind to set.public void setCatalinaCluster(CatalinaCluster cluster)
ClusterReceiver
setCatalinaCluster
in interface ClusterReceiver
cluster
- The clusterpublic CatalinaCluster getCatalinaCluster()
ClusterReceiver
getCatalinaCluster
in interface ClusterReceiver
public void setObjectName(javax.management.ObjectName name)
name
- public javax.management.ObjectName getObjectName()
public boolean isCompress()
isCompress
in interface ClusterReceiver
public void setCompress(boolean compressMessageData)
setCompress
in interface ClusterReceiver
compressMessageData
- The compress to set.public boolean isSendAck()
isSendAck
in interface ClusterReceiver
public void setSendAck(boolean sendAck)
setSendAck
in interface ClusterReceiver
sendAck
- public java.lang.String getTcpListenAddress()
public void setTcpListenAddress(java.lang.String tcpListenAddress)
tcpListenAddress
- public int getTcpListenPort()
public void setTcpListenPort(int tcpListenPort)
public java.lang.String getHost()
ClusterReceiver
getHost
in interface ClusterReceiver
public int getPort()
ClusterReceiver
getPort
in interface ClusterReceiver
public boolean isDoReceivedProcessingStats()
public void setDoReceivedProcessingStats(boolean doReceiverProcessingStats)
doReceiverProcessingStats
- The doReceivedProcessingStats to set.public long getMaxReceivedProcessingTime()
public long getMinReceivedProcessingTime()
public long getReceivedProcessingTime()
public long getTotalReceivedBytes()
public double getAvgReceivedProcessingTime()
public long getAvgTotalReceivedBytes()
public long getReceivedTime()
public long getLastChecked()
public long getNrOfMsgsReceived()
public void start()
start
in interface ClusterReceiver
ClusterReceiver.start()
public void stop()
stop
in interface ClusterReceiver
ClusterReceiver.stop()
,
stopListening()
protected void registerReceiverMBean()
protected void unregisterRecevierMBean()
protected abstract void stopListening()
protected abstract void listen() throws java.lang.Exception
java.lang.Exception
public void run()
run
in interface java.lang.Runnable
public void messageDataReceived(ClusterData data)
messageDataReceived
in interface ListenCallback
data
- - the message bytes received from the cluster/replication systemClusterSessionListener.messageReceived(ClusterMessage)
protected ClusterMessage deserialize(ClusterData data) throws java.io.IOException, java.lang.ClassNotFoundException
data
- uncompress data
java.io.IOException
java.lang.ClassNotFoundException
public void resetStatistics()
protected void addReceivedProcessingStats(long startTime)
startTime
- public void sendAck() throws java.io.IOException
ListenCallback
sendAck
in interface ListenCallback
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |