public abstract class BasicConnectionTable
extends java.lang.Object
限定符和类型 | 类和说明 |
---|---|
static interface |
BasicConnectionTable.ConnectionListener
Used to be notified about connection establishment and teardown.
|
static interface |
BasicConnectionTable.Receiver
Used for message reception.
|
限定符和类型 | 字段和说明 |
---|---|
protected Log |
log |
protected SocketFactory |
socket_factory |
限定符 | 构造器和说明 |
---|---|
protected |
BasicConnectionTable() |
限定符和类型 | 方法和说明 |
---|---|
void |
addConnectionListener(BasicConnectionTable.ConnectionListener l) |
int |
getLinger() |
Address |
getLocalAddress() |
static int |
getNumberOfConnectionCreations() |
int |
getNumConnections() |
int |
getPeerAddressReadTimeout() |
int |
getReceiveBufferSize() |
int |
getSendBufferSize() |
int |
getSendQueueSize() |
int |
getSocketConnectionTimeout() |
SocketFactory |
getSocketFactory() |
boolean |
getTcpNodelay() |
ThreadFactory |
getThreadFactory() |
boolean |
getUseSendQueues() |
void |
receive(Address sender,
byte[] data,
int offset,
int length)
Calls the receiver callback.
|
void |
removeConnection(Address addr)
Remove
addr from connection table. |
void |
removeConnectionListener(BasicConnectionTable.ConnectionListener l) |
void |
retainAll(java.util.Collection<Address> current_mbrs)
Removes all connections from ConnectionTable which are not in current_mbrs
|
void |
send(Address dest,
byte[] data,
int offset,
int length) |
void |
setLinger(int linger) |
void |
setPeerAddressReadTimeout(int peer_addr_read_timeout) |
void |
setReceiveBufferSize(int recv_buf_size) |
void |
setReceiver(BasicConnectionTable.Receiver r) |
void |
setSendBufferSize(int send_buf_size) |
void |
setSendQueueSize(int send_queue_size) |
void |
setSocketConnectionTimeout(int sock_conn_timeout) |
void |
setSocketFactory(SocketFactory socket_factory) |
void |
setTcpNodelay(boolean tcp_nodelay) |
void |
setThreadFactory(ThreadFactory factory) |
void |
setUseSendQueues(boolean flag) |
void |
start() |
void |
stop() |
java.lang.String |
toString() |
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
在类中 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
-