Class 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
Since:
5.3.3
Author:
Bela Ban
  • Field Details

    • queue

      protected final BlockingQueue<ByteArray> queue
      Deprecated, for removal: This API element is subject to removal in a future version.
    • max_size

      protected int max_size
      Deprecated, for removal: This API element is subject to removal in a future version.
    • sender

      protected final Runner sender
      Deprecated, for removal: This API element is subject to removal in a future version.
    • dropped_msgs

      protected final LongAdder dropped_msgs
      Deprecated, for removal: This API element is subject to removal in a future version.
    • remove_queue

      protected final FastArray<ByteArray> remove_queue
      Deprecated, for removal: This API element is subject to removal in a future version.
    • rq_capacity

      protected int rq_capacity
      Deprecated, 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

      public TcpConnectionNonBlocking(Socket s, TcpServer server, int max_size) throws Exception
      Deprecated, for removal: This API element is subject to removal in a future version.
      Throws:
      Exception
  • 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:
      start in class TcpConnection
    • close

      public void close() throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Overrides:
      close in class TcpConnection
      Throws:
      IOException
    • send

      public void send(byte[] data, int offset, int length) throws Exception
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      send in class TcpConnection
      Throws:
      Exception
    • run

      public void run()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      run in interface Runnable
    • toString

      public String toString()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      toString in class TcpConnection
    • name

      protected String name()
      Deprecated, for removal: This API element is subject to removal in a future version.