public class TCPSender extends NetworkSender<java.nio.channels.SocketChannel>
| Modifier and Type | Class and Description |
|---|---|
static class |
TCPSender.Config |
NetworkSender.UnmatchedAckException| Constructor and Description |
|---|
TCPSender() |
TCPSender(FailureDetector failureDetector) |
TCPSender(TCPSender.Config config) |
TCPSender(TCPSender.Config config,
FailureDetector failureDetector) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
closeSocket() |
protected java.nio.channels.SocketChannel |
getOrCreateSocketInternal() |
protected void |
recvResponse(java.nio.channels.SocketChannel socketChannel,
java.nio.ByteBuffer buffer) |
protected void |
sendBuffers(java.nio.channels.SocketChannel socketChannel,
java.util.List<java.nio.ByteBuffer> buffers) |
java.lang.String |
toString() |
close, getConnectionTimeoutMilli, getFailureDetector, getHost, getPort, getReadTimeoutMilli, isAvailable, sendInternalsend, send, sendWithAckpublic TCPSender()
public TCPSender(TCPSender.Config config)
public TCPSender(FailureDetector failureDetector)
public TCPSender(TCPSender.Config config, FailureDetector failureDetector)
protected java.nio.channels.SocketChannel getOrCreateSocketInternal()
throws java.io.IOException
java.io.IOExceptionprotected void sendBuffers(java.nio.channels.SocketChannel socketChannel,
java.util.List<java.nio.ByteBuffer> buffers)
throws java.io.IOException
java.io.IOExceptionprotected void recvResponse(java.nio.channels.SocketChannel socketChannel,
java.nio.ByteBuffer buffer)
throws java.io.IOException
java.io.IOExceptionprotected void closeSocket()
throws java.io.IOException
java.io.IOExceptionpublic java.lang.String toString()
toString in class NetworkSender<java.nio.channels.SocketChannel>