Class ParallelNioSender
java.lang.Object
org.apache.catalina.tribes.transport.AbstractSender
org.apache.catalina.tribes.transport.nio.ParallelNioSender
- All Implemented Interfaces:
DataSender, MultiPointSender
A sender that sends messages to multiple members in parallel using NIO.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final longThe timeout in milliseconds for the selector select operation.protected static final StringManagerThe string manager for this package. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidSend to the specified member.voidconnect()Connect.voidDisconnect.booleanKeepalive.voidStop sending to the specified member.voidsendMessage(Member[] destination, ChannelMessage msg) Send the specified message.Methods inherited from class AbstractSender
getAddress, getAttempt, getConnectTime, getDestination, getDirectBuffer, getKeepAliveCount, getKeepAliveTime, getMaxRetryAttempts, getOoBInline, getPort, getRequestCount, getRxBufSize, getSoKeepAlive, getSoLingerOn, getSoLingerTime, getSoReuseAddress, getSoTrafficClass, getTcpNoDelay, getThrowOnFailedAck, getTimeout, getTxBufSize, getUdpPort, getUdpRxBufSize, getUdpTxBufSize, isConnected, isUdpBased, setAddress, setAttempt, setConnected, setConnectTime, setDestination, setDirectBuffer, setKeepAliveCount, setKeepAliveTime, setMaxRetryAttempts, setOoBInline, setPort, setRequestCount, setRxBufSize, setSoKeepAlive, setSoLingerOn, setSoLingerTime, setSoReuseAddress, setSoTrafficClass, setTcpNoDelay, setThrowOnFailedAck, setTimeout, setTxBufSize, setUdpBased, setUdpPort, setUdpRxBufSize, setUdpTxBufSize, transferPropertiesMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface DataSender
getConnectTime, getRequestCount, isConnected, setKeepAliveCount, setKeepAliveTime, setRxBufSize, setTimeout, setTxBufSizeMethods inherited from interface MultiPointSender
setDirectBuffer, setMaxRetryAttempts
-
Field Details
-
sm
The string manager for this package. -
selectTimeout
protected final long selectTimeoutThe timeout in milliseconds for the selector select operation.- See Also:
-
-
Constructor Details
-
ParallelNioSender
Construct a newParallelNioSender.- Throws:
IOException- If an I/O error occurs during initialization
-
-
Method Details
-
sendMessage
Description copied from interface:MultiPointSenderSend the specified message.- Specified by:
sendMessagein interfaceMultiPointSender- Parameters:
destination- the message destinationsmsg- the data to send- Throws:
ChannelException- if an error occurs
-
connect
public void connect()Description copied from interface:DataSenderConnect.- Specified by:
connectin interfaceDataSender
-
add
Description copied from interface:MultiPointSenderSend to the specified member.- Specified by:
addin interfaceMultiPointSender- Parameters:
member- the member
-
remove
Description copied from interface:MultiPointSenderStop sending to the specified member.- Specified by:
removein interfaceMultiPointSender- Parameters:
member- the member
-
disconnect
public void disconnect()Description copied from interface:DataSenderDisconnect.- Specified by:
disconnectin interfaceDataSender
-
keepalive
public boolean keepalive()Description copied from interface:DataSenderKeepalive.- Specified by:
keepalivein interfaceDataSender- Overrides:
keepalivein classAbstractSender- Returns:
trueif kept alive
-