Class NioBaseServer

java.lang.Object
org.jgroups.blocks.cs.BaseServer
org.jgroups.blocks.cs.NioBaseServer
All Implemented Interfaces:
Closeable, AutoCloseable, ConnectionListener
Direct Known Subclasses:
NioClient, NioServer

public abstract class NioBaseServer extends BaseServer
Since:
3.6.5
  • Field Details

    • selector

      protected Selector selector
    • acceptor

      protected Thread acceptor
    • reg_lock

      protected final Lock reg_lock
    • registration

      protected volatile boolean registration
    • max_send_buffers

      protected int max_send_buffers
    • num_selects

      protected int num_selects
    • copy_on_partial_write

      protected boolean copy_on_partial_write
    • reader_idle_time

      protected long reader_idle_time
  • Constructor Details

  • Method Details

    • maxSendBuffers

      public int maxSendBuffers()
    • maxSendBuffers

      public NioBaseServer maxSendBuffers(int num)
    • selectorOpen

      public boolean selectorOpen()
    • acceptorRunning

      public boolean acceptorRunning()
    • numSelects

      public int numSelects()
    • copyOnPartialWrite

      public boolean copyOnPartialWrite()
    • readerIdleTime

      public long readerIdleTime()
    • readerIdleTime

      public NioBaseServer readerIdleTime(long t)
    • copyOnPartialWrite

      public NioBaseServer copyOnPartialWrite(boolean b)
    • numPartialWrites

      public int numPartialWrites()
    • printBuffers

      public String printBuffers()
      Prints send and receive buffers for all connections
    • register

      protected SelectionKey register(SelectableChannel ch, int interest_ops, NioConnection conn) throws Exception
      Throws:
      Exception
    • createConnection

      protected NioConnection createConnection(Address dest) throws Exception
      Description copied from class: BaseServer
      Creates a new connection object to target dest, but doesn't yet connect it
      Specified by:
      createConnection in class BaseServer
      Throws:
      Exception
    • handleAccept

      protected void handleAccept(SelectionKey key) throws Exception
      Throws:
      Exception
    • acceptorDone

      protected void acceptorDone()