Package org.jgroups.blocks.cs
Class NioBaseServer
java.lang.Object
org.jgroups.blocks.cs.BaseServer
org.jgroups.blocks.cs.NioBaseServer
- All Implemented Interfaces:
Closeable,AutoCloseable,ConnectionListener
- Since:
- 3.6.5
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.jgroups.blocks.cs.BaseServer
BaseServer.Reaper -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Threadprotected booleanprotected intprotected intprotected longprotected final Lockprotected booleanprotected SelectorFields inherited from class org.jgroups.blocks.cs.BaseServer
client_bind_addr, client_bind_port, conn_expire_time, conn_listeners, conns, defer_client_binding, factory, linger, local_addr, lock, log, log_details, max_length, OK, reaper, reaperInterval, receiver, recv_buf_size, running, send_buf_size, sock_conn_timeout, socket_factory, tcp_nodelay, time_service, use_acks, use_peer_connections -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedNioBaseServer(ThreadFactory f, SocketFactory sf, int recv_buf_size) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidbooleanbooleancopyOnPartialWrite(boolean b) protected NioConnectioncreateConnection(Address dest) Creates a new connection object to target dest, but doesn't yet connect itprotected voidhandleAccept(SelectionKey key) intmaxSendBuffers(int num) intintPrints send and receive buffers for all connectionslongreaderIdleTime(long t) protected SelectionKeyregister(SelectableChannel ch, int interest_ops, NioConnection conn) booleanMethods inherited from class org.jgroups.blocks.cs.BaseServer
addConnection, addConnectionListener, clearConnections, clientBindAddress, clientBindAddress, clientBindPort, clientBindPort, close, closeConnection, closeConnection, closeConnection, closeConnection, connected, connectionClosed, connectionEstablished, connectionEstablishedTo, connExpireTime, connExpireTimeout, deferClientBinding, deferClientBinding, explanation, flush, flushAll, forAllConnections, getConnection, getConnection, getMaxLength, getNumConnections, getNumOpenConnections, hasConnection, linger, linger, localAddress, localAddress, log, log, logDetails, logDetails, notifyConnectionClosed, notifyConnectionEstablished, printConnections, reaperInterval, reaperInterval, receive, receive, receive, receiveBufferSize, receiveBufferSize, receiver, receiver, removeConnectionIfPresent, removeConnectionListener, replaceConnection, retainAll, running, send, send, sendBufferSize, sendBufferSize, sendToAll, sendToAll, setMaxLength, socketConnectionTimeout, socketConnectionTimeout, socketFactory, socketFactory, start, stop, tcpNodelay, tcpNodelay, timeService, timeService, toString, toString, useAcks, useAcks, usePeerConnections, usePeerConnections, validateArgs
-
Field Details
-
selector
-
acceptor
-
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
-
NioBaseServer
-
-
Method Details
-
maxSendBuffers
public int maxSendBuffers() -
maxSendBuffers
-
selectorOpen
public boolean selectorOpen() -
acceptorRunning
public boolean acceptorRunning() -
numSelects
public int numSelects() -
copyOnPartialWrite
public boolean copyOnPartialWrite() -
readerIdleTime
public long readerIdleTime() -
readerIdleTime
-
copyOnPartialWrite
-
numPartialWrites
public int numPartialWrites() -
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
Description copied from class:BaseServerCreates a new connection object to target dest, but doesn't yet connect it- Specified by:
createConnectionin classBaseServer- Throws:
Exception
-
handleAccept
- Throws:
Exception
-
acceptorDone
protected void acceptorDone()
-