Class TcpBaseServer
java.lang.Object
org.jgroups.blocks.cs.BaseServer
org.jgroups.blocks.cs.TcpBaseServer
- All Implemented Interfaces:
Closeable, AutoCloseable, ConnectionListener
Common base class for TCP based clients and servers
- Since:
- 3.6.5
- Author:
- Bela Ban
-
Nested Class Summary
Nested classes/interfaces inherited from class BaseServer
BaseServer.Reaper -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intprotected intprotected intprotected booleanprotected intprotected booleanFields inherited from class BaseServer
client_bind_addr, client_bind_port, conn_expire_time, conn_listeners, conns, defer_client_binding, factory, linger, local_addr, locks, log, log_details, max_length, reaper, reaperInterval, receiver, recv_buf_size, running, send_buf_size, sock_conn_timeout, socket_factory, tcp_nodelay, time_service, timer, use_peer_connections -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedTcpBaseServer(ThreadFactory f, SocketFactory sf, int recv_buf_size) -
Method Summary
Modifier and TypeMethodDescriptionprotected TcpConnectioncreateConnection(Address dest) Creates a new connection object to target dest, but doesn't yet connect itintintintmaxSendQueue(int s) booleannonBlockingSends(boolean b) intpeerAddressReadTimeout(int t) setBufferedInputStreamSize(int s) setBufferedOutputStreamSize(int s) booleanuseLockToSend(boolean u) Methods inherited from class BaseServer
addConnectionListener, clearConnections, clearConnections, clientBindAddress, clientBindAddress, clientBindPort, clientBindPort, close, closeConnection, closeConnection, closeConnection, closeConnection, connected, connectionClosed, connectionEstablished, connectionEstablishedTo, connExpireTime, connExpireTimeout, deferClientBinding, deferClientBinding, explanation, flush, flushAll, forAllConnections, getConnection, getLock, getMaxLength, getNumConnections, getNumOpenConnections, handleIncomingConnection, handleOutgoingConnection, 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, retainAll, running, send, send, sendBufferSize, sendBufferSize, sendToAll, sendToAll, setMaxLength, socketConnectionTimeout, socketConnectionTimeout, socketFactory, socketFactory, start, stop, tcpNodelay, tcpNodelay, timer, timer, timeService, timeService, toString, toString, useAcks, useAcks, usePeerConnections, usePeerConnections, validateArgs
-
Field Details
-
peer_addr_read_timeout
protected int peer_addr_read_timeout -
buffered_inputstream_size
protected int buffered_inputstream_size -
buffered_outputstream_size
protected int buffered_outputstream_size -
non_blocking_sends
protected boolean non_blocking_sends -
max_send_queue
protected int max_send_queue -
use_lock_to_send
protected boolean use_lock_to_send
-
-
Constructor Details
-
TcpBaseServer
-
-
Method Details
-
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
-
peerAddressReadTimeout
public int peerAddressReadTimeout() -
peerAddressReadTimeout
-
getBufferedInputStreamSize
public int getBufferedInputStreamSize() -
setBufferedInputStreamSize
-
getBufferedOutputStreamSize
public int getBufferedOutputStreamSize() -
setBufferedOutputStreamSize
-
nonBlockingSends
public boolean nonBlockingSends() -
nonBlockingSends
-
maxSendQueue
public int maxSendQueue() -
maxSendQueue
-
useLockToSend
public boolean useLockToSend() -
useLockToSend
-