Class TcpConnectionNonBlocking
java.lang.Object
org.jgroups.blocks.cs.Connection
org.jgroups.blocks.cs.TcpConnection
org.jgroups.blocks.cs.TcpConnectionNonBlocking
- All Implemented Interfaces:
Closeable, AutoCloseable, Runnable
@Deprecated(since="5.6.0",
forRemoval=true)
public class TcpConnectionNonBlocking
extends TcpConnection
implements Runnable
Deprecated, for removal: This API element is subject to removal in a future version.
Use PerDestinationBundler with use_single_sender_thread = false instead
(https://redhat.atlassian.net/browse/JGRP-3028)
TCP connection which (despite the fancy name) blocks only a single thread at most. Uses a bounded queue, to which
senders add their messages, and a single consumer sending the messages. When the queue is full, messages will
get dropped. Therefore, at most one thread is blocked on TCP write when the send-window is full.
Link: https://issues.redhat.com/browse/JGRP-2759
Link: https://issues.redhat.com/browse/JGRP-2759
- Since:
- 5.3.3
- Author:
- Bela Ban
-
Nested Class Summary
Nested classes/interfaces inherited from class TcpConnection
TcpConnection.Receiver -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final LongAdderDeprecated, for removal: This API element is subject to removal in a future version.protected intDeprecated, for removal: This API element is subject to removal in a future version.protected final BlockingQueue<ByteArray> Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.protected intDeprecated, for removal: This API element is subject to removal in a future version.protected final RunnerDeprecated, for removal: This API element is subject to removal in a future version.Fields inherited from class TcpConnection
connected, in, length_buf, out, receiver, sock, use_lock_to_send, writersFields inherited from class Connection
closed_gracefully, cookie, GRACEFUL_CLOSE, last_access, peer_addr, send_lock, server -
Constructor Summary
ConstructorsConstructorDescriptionTcpConnectionNonBlocking(Socket s, TcpServer server, int max_size) Deprecated, for removal: This API element is subject to removal in a future version.TcpConnectionNonBlocking(Address peer_addr, TcpBaseServer server, int max_size) Deprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Deprecated, for removal: This API element is subject to removal in a future version.longDeprecated, for removal: This API element is subject to removal in a future version.intmaxSize()Deprecated, for removal: This API element is subject to removal in a future version.protected Stringname()Deprecated, for removal: This API element is subject to removal in a future version.intDeprecated, for removal: This API element is subject to removal in a future version.voidrun()Deprecated, for removal: This API element is subject to removal in a future version.voidsend(byte[] data, int offset, int length) Deprecated, for removal: This API element is subject to removal in a future version.booleanDeprecated, for removal: This API element is subject to removal in a future version.voidstart()Deprecated, for removal: This API element is subject to removal in a future version.toString()Deprecated, for removal: This API element is subject to removal in a future version.Methods inherited from class TcpConnection
close, closeGracefully, connect, connect, createDataInputStream, createDataOutputStream, doClose, doSend, flush, getSockAddress, handshake, isClosed, isConnected, isConnectionPending, localAddress, locklessSend, readPeerAddress, send, send, sendLocalAddress, setSocketParameters, status, useLockToSend, useLockToSendMethods inherited from class Connection
getTimestamp, isClosedGracefully, isExpired, peerAddress, setClosedGracefully, updateLastAccessed
-
Field Details
-
queue
Deprecated, for removal: This API element is subject to removal in a future version. -
max_size
protected int max_sizeDeprecated, for removal: This API element is subject to removal in a future version. -
sender
Deprecated, for removal: This API element is subject to removal in a future version. -
dropped_msgs
Deprecated, for removal: This API element is subject to removal in a future version. -
remove_queue
-
rq_capacity
protected int rq_capacityDeprecated, for removal: This API element is subject to removal in a future version.
-
-
Constructor Details
-
TcpConnectionNonBlocking
public TcpConnectionNonBlocking(Address peer_addr, TcpBaseServer server, int max_size) throws Exception Deprecated, for removal: This API element is subject to removal in a future version.- Throws:
Exception
-
TcpConnectionNonBlocking
-
-
Method Details
-
maxSize
public int maxSize()Deprecated, for removal: This API element is subject to removal in a future version. -
droppedMessages
public long droppedMessages()Deprecated, for removal: This API element is subject to removal in a future version. -
queueSize
public int queueSize()Deprecated, for removal: This API element is subject to removal in a future version. -
senderRunning
public boolean senderRunning()Deprecated, for removal: This API element is subject to removal in a future version. -
start
public void start()Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
startin classTcpConnection
-
close
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classTcpConnection- Throws:
IOException
-
send
Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
sendin classTcpConnection- Throws:
Exception
-
run
-
toString
Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
toStringin classTcpConnection
-
name
Deprecated, for removal: This API element is subject to removal in a future version.
-