|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.catalina.cluster.tcp.DataSender org.apache.catalina.cluster.tcp.FastAsyncSocketSender
Send cluster messages from a Message queue with only one socket. Ack and keep
Alive Handling is supported. Fast Queue can limit queue size and consume all messages at queue at one block.
Limit the queue lock contention under high load!
Field Summary |
Fields inherited from class org.apache.catalina.cluster.tcp.DataSender |
connectCounter, createTime, dataFailureCounter, dataResendCounter, disconnectCounter, doProcessingStats, doWaitAckStats, keepAliveConnectTime, keepAliveCount, maxProcessingTime, maxWaitAckTime, minProcessingTime, minWaitAckTime, missingAckCounter, nrOfRequests, processingTime, sm, totalBytes, waitAckTime |
Constructor Summary | |
FastAsyncSocketSender(java.lang.String domain,
java.net.InetAddress host,
int port)
start background thread to push incomming cluster messages to replication node |
Method Summary | |
protected void |
checkThread()
Start Queue thread as daemon |
void |
connect()
Connect to socket and start background thread to push queued messages |
void |
disconnect()
Disconnect socket ad stop queue thread |
java.lang.String |
getInfo()
Return descriptive information about this implementation and the corresponding version number, in the format <description>/<version> . |
long |
getInQueueCounter()
|
int |
getMaxQueueLength()
|
long |
getOutQueueCounter()
|
long |
getQueueAddWaitTime()
|
long |
getQueueAddWaitTimeout()
get current add wait timeout |
long |
getQueuedNrOfBytes()
|
long |
getQueueRemoveWaitTime()
|
long |
getQueueRemoveWaitTimeout()
get current remove wait timeout |
int |
getQueueSize()
|
int |
getRecoverCounter()
get current push message recover counter |
long |
getRecoverTimeout()
get current push message recover timeout |
int |
getThreadPriority()
Get the current threadPriority |
boolean |
isQueueCheckLock()
|
boolean |
isQueueDoStats()
|
boolean |
isQueueTimeWait()
|
void |
resetStatistics()
Reset sender statistics |
void |
sendMessage(ClusterData data)
Send message to queue for later sending. |
void |
setMaxQueueLength(int length)
|
void |
setQueueAddWaitTimeout(long timeout)
Set add wait timeout (default 10000 msec) |
void |
setQueueCheckLock(boolean checkLock)
|
void |
setQueueDoStats(boolean doStats)
|
void |
setQueueTimeWait(boolean timeWait)
|
void |
setRecoverCounter(int counter)
Set recover couner (default 5 ) |
void |
setRecoverTimeout(long timeout)
Set recover timeout (default 5000 msec) |
void |
setRemoveWaitTimeout(long timeout)
set remove wait timeout ( default 30000 msec) |
void |
setThreadPriority(int threadPriority)
change active the queue Thread priority |
protected void |
stopThread()
stop queue worker thread |
java.lang.String |
toString()
Name of this SockerSender |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public FastAsyncSocketSender(java.lang.String domain, java.net.InetAddress host, int port)
domain
- replication cluster domain (session domain)host
- replication node tcp addressport
- replication node tcp portMethod Detail |
public java.lang.String getInfo()
<description>/<version>
.
getInfo
in class DataSender
public long getQueueAddWaitTimeout()
public void setQueueAddWaitTimeout(long timeout)
timeout
- public long getQueueRemoveWaitTimeout()
public void setRemoveWaitTimeout(long timeout)
timeout
- public boolean isQueueCheckLock()
public void setQueueCheckLock(boolean checkLock)
checkLock
- The checkLock to set.public boolean isQueueDoStats()
public void setQueueDoStats(boolean doStats)
doStats
- The doStats to set.public boolean isQueueTimeWait()
public void setQueueTimeWait(boolean timeWait)
timeWait
- The timeWait to set.public int getMaxQueueLength()
public void setMaxQueueLength(int length)
length
- max queue lengthpublic long getQueueAddWaitTime()
public long getQueueRemoveWaitTime()
public long getInQueueCounter()
public long getOutQueueCounter()
public int getQueueSize()
public long getRecoverTimeout()
public void setRecoverTimeout(long timeout)
timeout
- public int getRecoverCounter()
public void setRecoverCounter(int counter)
counter
- public void setThreadPriority(int threadPriority)
threadPriority
- value must be between MIN and MAX Thread Priority
java.lang.IllegalArgumentException
public int getThreadPriority()
public long getQueuedNrOfBytes()
public void connect() throws java.io.IOException
connect
in interface IDataSender
connect
in class DataSender
java.io.IOException
IDataSender.connect()
public void disconnect()
disconnect
in interface IDataSender
disconnect
in class DataSender
IDataSender.disconnect()
public void sendMessage(ClusterData data) throws java.io.IOException
sendMessage
in interface IDataSender
sendMessage
in class DataSender
java.io.IOException
DataSender.pushMessage(ClusterData)
public void resetStatistics()
resetStatistics
in class DataSender
public java.lang.String toString()
toString
in class DataSender
protected void checkThread()
protected void stopThread()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |