public abstract class BasicConnectionTable
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static interface |
BasicConnectionTable.ConnectionListener
Used to be notified about connection establishment and teardown.
|
static interface |
BasicConnectionTable.Receiver
Used for message reception.
|
Modifier and Type | Field and Description |
---|---|
protected Log |
log |
protected SocketFactory |
socket_factory |
Modifier | Constructor and Description |
---|---|
protected |
BasicConnectionTable() |
protected final Log log
protected SocketFactory socket_factory
public final void setReceiver(BasicConnectionTable.Receiver r)
public void addConnectionListener(BasicConnectionTable.ConnectionListener l)
public void removeConnectionListener(BasicConnectionTable.ConnectionListener l)
public Address getLocalAddress()
public int getSendBufferSize()
public void setSendBufferSize(int send_buf_size)
public int getReceiveBufferSize()
public void setReceiveBufferSize(int recv_buf_size)
public int getSocketConnectionTimeout()
public void setSocketConnectionTimeout(int sock_conn_timeout)
public int getPeerAddressReadTimeout()
public void setPeerAddressReadTimeout(int peer_addr_read_timeout)
public int getNumConnections()
public static int getNumberOfConnectionCreations()
public boolean getTcpNodelay()
public void setTcpNodelay(boolean tcp_nodelay)
public int getLinger()
public void setLinger(int linger)
public void setThreadFactory(ThreadFactory factory)
public ThreadFactory getThreadFactory()
public SocketFactory getSocketFactory()
public void setSocketFactory(SocketFactory socket_factory)
public boolean getUseSendQueues()
public void setUseSendQueues(boolean flag)
public int getSendQueueSize()
public void setSendQueueSize(int send_queue_size)
public void start() throws java.lang.Exception
java.lang.Exception
public void stop()
public void removeConnection(Address addr)
addr
from connection table. This is typically triggered when a member is suspected.public void receive(Address sender, byte[] data, int offset, int length)
public java.lang.String toString()
toString
in class java.lang.Object
public void send(Address dest, byte[] data, int offset, int length) throws java.lang.Exception
java.lang.Exception
public void retainAll(java.util.Collection<Address> current_mbrs)
current_mbrs
- Copyright © 1998-2020 Red Hat. All Rights Reserved.