Package org.jgroups.blocks
Class BasicConnectionTable
java.lang.Object
org.jgroups.blocks.BasicConnectionTable
- Direct Known Subclasses:
ConnectionTable
,ConnectionTableNIO
Shared class for TCP connection tables.
- Author:
- Scott Marlow, Bela Ban
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface
Used to be notified about connection establishment and teardown.static interface
Used for message reception. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final org.apache.commons.logging.Log
protected PortsManager
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
int
static int
int
int
int
int
int
int
boolean
boolean
void
Calls the receiver callback.void
removeConnection
(Address addr) Removeaddr
from connection table.void
void
retainAll
(Collection<Address> current_mbrs) Removes all connections from ConnectionTable which are not in current_mbrsvoid
void
setLinger
(int linger) void
setPeerAddressReadTimeout
(int peer_addr_read_timeout) void
setReceiveBufferSize
(int recv_buf_size) final void
void
setSendBufferSize
(int send_buf_size) void
setSendQueueSize
(int send_queue_size) void
setSocketConnectionTimeout
(int sock_conn_timeout) void
setTcpNodelay
(boolean tcp_nodelay) void
setThreadFactory
(ThreadFactory factory) void
setUseSendQueues
(boolean flag) void
start()
void
stop()
toString()
-
Field Details
-
log
protected final org.apache.commons.logging.Log log -
pm
-
-
Constructor Details
-
BasicConnectionTable
protected BasicConnectionTable()
-
-
Method Details
-
setReceiver
-
addConnectionListener
-
removeConnectionListener
-
getLocalAddress
-
getSendBufferSize
public int getSendBufferSize() -
setSendBufferSize
public void setSendBufferSize(int send_buf_size) -
getReceiveBufferSize
public int getReceiveBufferSize() -
setReceiveBufferSize
public void setReceiveBufferSize(int recv_buf_size) -
getSocketConnectionTimeout
public int getSocketConnectionTimeout() -
setSocketConnectionTimeout
public void setSocketConnectionTimeout(int sock_conn_timeout) -
getPeerAddressReadTimeout
public int getPeerAddressReadTimeout() -
setPeerAddressReadTimeout
public void setPeerAddressReadTimeout(int peer_addr_read_timeout) -
getNumConnections
public int getNumConnections() -
getNumberOfConnectionCreations
public static int getNumberOfConnectionCreations() -
getTcpNodelay
public boolean getTcpNodelay() -
setTcpNodelay
public void setTcpNodelay(boolean tcp_nodelay) -
getLinger
public int getLinger() -
setLinger
public void setLinger(int linger) -
setThreadFactory
-
getThreadFactory
-
getUseSendQueues
public boolean getUseSendQueues() -
setUseSendQueues
public void setUseSendQueues(boolean flag) -
getSendQueueSize
public int getSendQueueSize() -
setSendQueueSize
public void setSendQueueSize(int send_queue_size) -
start
- Throws:
Exception
-
stop
public void stop() -
removeConnection
Removeaddr
from connection table. This is typically triggered when a member is suspected. -
receive
Calls the receiver callback. We do not serialize access to this method, and it may be called concurrently by several Connection handler threads. Therefore the receiver needs to be reentrant. -
toString
-
send
- Throws:
Exception
-
retainAll
Removes all connections from ConnectionTable which are not in current_mbrs- Parameters:
current_mbrs
-
-