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 org.apache.commons.logging.Log |
log |
| Constructor and Description |
|---|
BasicConnectionTable() |
| Modifier and Type | Method and Description |
|---|---|
void |
addConnectionListener(BasicConnectionTable.ConnectionListener l) |
int |
getLinger() |
Address |
getLocalAddress() |
int |
getNumConnections() |
int |
getReceiveBufferSize() |
int |
getSendBufferSize() |
int |
getSocketConnectionTimeout() |
boolean |
getTcpNodelay() |
boolean |
getUseSendQueues() |
void |
receive(Address sender,
byte[] data,
int offset,
int length)
Calls the receiver callback.
|
void |
remove(Address addr)
Remove
addrfrom connection table. |
void |
removeConnectionListener(BasicConnectionTable.ConnectionListener l) |
void |
retainAll(java.util.Collection 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 |
setReceiveBufferSize(int recv_buf_size) |
void |
setReceiver(BasicConnectionTable.Receiver r) |
void |
setSendBufferSize(int send_buf_size) |
void |
setSocketConnectionTimeout(int sock_conn_timeout) |
void |
setTcpNodelay(boolean tcp_nodelay) |
void |
setUseSendQueues(boolean flag) |
void |
start() |
void |
stop() |
java.lang.String |
toString() |
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 getNumConnections()
public boolean getTcpNodelay()
public void setTcpNodelay(boolean tcp_nodelay)
public int getLinger()
public void setLinger(int linger)
public boolean getUseSendQueues()
public void setUseSendQueues(boolean flag)
public void start()
throws java.lang.Exception
java.lang.Exceptionpublic void stop()
public void remove(Address addr)
addrfrom 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.Objectpublic void send(Address dest, byte[] data, int offset, int length) throws java.lang.Exception
java.lang.Exceptionpublic void retainAll(java.util.Collection current_mbrs)
current_mbrs - Copyright ? 1998-2006 Bela Ban. All Rights Reserved.