org.jgroups.blocks
public class TCPConnectionMap extends Object
Modifier and Type | Class and Description |
---|---|
protected class |
TCPConnectionMap.ConnectionAcceptor |
protected class |
TCPConnectionMap.Mapper |
static interface |
TCPConnectionMap.Receiver
Used for message reception.
|
class |
TCPConnectionMap.TCPConnection |
Modifier and Type | Field and Description |
---|---|
protected Thread |
acceptor |
protected InetAddress |
bind_addr |
protected InetAddress |
client_bind_addr |
protected int |
client_bind_port |
protected long |
conn_expire_time |
protected boolean |
defer_client_bind_addr |
protected int |
linger |
protected Address |
local_addr |
protected Log |
log |
protected TCPConnectionMap.Mapper |
mapper |
protected int |
peer_addr_read_timeout |
protected TCPConnectionMap.Receiver |
receiver |
protected int |
recv_buf_size |
protected AtomicBoolean |
running |
protected int |
send_buf_size |
protected int |
send_queue_size |
protected int |
sock_conn_timeout |
protected SocketFactory |
socket_factory |
protected ServerSocket |
srv_sock |
protected boolean |
tcp_nodelay |
protected boolean |
use_send_queues |
Constructor and Description |
---|
TCPConnectionMap(String service_name,
ThreadFactory f,
SocketFactory socket_factory,
TCPConnectionMap.Receiver r,
InetAddress bind_addr,
boolean defer_client_bind_addr,
InetAddress external_addr,
int external_port,
int srv_port,
int max_port,
long reaper_interval,
long conn_expire_time) |
TCPConnectionMap(String service_name,
ThreadFactory f,
SocketFactory socket_factory,
TCPConnectionMap.Receiver r,
InetAddress bind_addr,
InetAddress external_addr,
int external_port,
int srv_port,
int max_port) |
TCPConnectionMap(String service_name,
ThreadFactory f,
TCPConnectionMap.Receiver r,
InetAddress bind_addr,
InetAddress external_addr,
int external_port,
int srv_port,
int max_port,
long reaper_interval,
long conn_expire_time) |
protected final TCPConnectionMap.Mapper mapper
protected final InetAddress bind_addr
protected InetAddress client_bind_addr
protected int client_bind_port
protected boolean defer_client_bind_addr
protected final Address local_addr
protected final ServerSocket srv_sock
protected TCPConnectionMap.Receiver receiver
protected final long conn_expire_time
protected final Log log
protected int recv_buf_size
protected int send_buf_size
protected int send_queue_size
protected int sock_conn_timeout
protected int peer_addr_read_timeout
protected boolean tcp_nodelay
protected int linger
protected final Thread acceptor
protected final AtomicBoolean running
protected volatile boolean use_send_queues
protected SocketFactory socket_factory
public TCPConnectionMap(String service_name, ThreadFactory f, SocketFactory socket_factory, TCPConnectionMap.Receiver r, InetAddress bind_addr, InetAddress external_addr, int external_port, int srv_port, int max_port) throws Exception
Exception
public TCPConnectionMap(String service_name, ThreadFactory f, TCPConnectionMap.Receiver r, InetAddress bind_addr, InetAddress external_addr, int external_port, int srv_port, int max_port, long reaper_interval, long conn_expire_time) throws Exception
Exception
public TCPConnectionMap(String service_name, ThreadFactory f, SocketFactory socket_factory, TCPConnectionMap.Receiver r, InetAddress bind_addr, boolean defer_client_bind_addr, InetAddress external_addr, int external_port, int srv_port, int max_port, long reaper_interval, long conn_expire_time) throws Exception
Exception
public Address getLocalAddress()
public TCPConnectionMap.Receiver getReceiver()
public void setReceiver(TCPConnectionMap.Receiver receiver)
public SocketFactory getSocketFactory()
public void setSocketFactory(SocketFactory factory)
public InetAddress clientBindAddress()
public TCPConnectionMap clientBindAddress(InetAddress addr)
public int clientBindPort()
public TCPConnectionMap clientBindPort(int port)
public TCPConnectionMap peerAddressReadTimeout(int timeout)
public void addConnectionMapListener(AbstractConnectionMap.ConnectionMapListener<TCPConnectionMap.TCPConnection> l)
public void removeConnectionMapListener(AbstractConnectionMap.ConnectionMapListener<TCPConnectionMap.TCPConnection> l)
public void receive(Address sender, byte[] data, int offset, int length)
public void send(Address dest, byte[] data, int offset, int length) throws Exception
Exception
public void stop()
protected void setSocketParameters(Socket client_sock) throws SocketException
SocketException
public void setReceiveBufferSize(int recv_buf_size)
public void setSocketConnectionTimeout(int sock_conn_timeout)
public void setSendBufferSize(int send_buf_size)
public void setLinger(int linger)
public void setTcpNodelay(boolean tcp_nodelay)
public void setSendQueueSize(int send_queue_size)
public void setUseSendQueues(boolean use_send_queues)
public int getNumConnections()
public boolean connectionEstablishedTo(Address addr)
public String printConnections()
public void retainAll(Collection<Address> members)
public long getConnectionExpiryTimeout()
public int getSenderQueueSize()
Copyright © 2018 JBoss, a division of Red Hat. All rights reserved.