| org.jgroups.protocols.TP org.jgroups.protocols.BasicTCP org.jgroups.protocols.TCP
TCP | public class TCP extends BasicTCP implements ConnectionTable.Receiver(Code) | | TCP based protocol. Creates a server socket, which gives us the local address of this group member. For
each accept() on the server socket, a new thread is created that listens on the socket.
For each outgoing message m, if m.dest is in the ougoing hashtable, the associated socket will be reused
to send message, otherwise a new socket is created and put in the hashtable.
When a socket connection breaks or a member is removed from the group, the corresponding items in the
incoming and outgoing hashtables will be removed as well.
This functionality is in ConnectionTable, which isT used by TCP. TCP sends messages using ct.send() and
registers with the connection table to receive all incoming messages.
author: Bela Ban |
Constructor Summary | |
public | TCP() |
getConnectionTable | protected ConnectionTable getConnectionTable(long reaperInterval, long connExpireTime, InetAddress bindAddress, InetAddress externalAddress, int startPort, int endPort) throws Exception(Code) | | Parameters: reaperInterval - Parameters: connExpireTime - Parameters: bindAddress - Parameters: startPort - throws: Exception - ConnectionTableSub classes overrides this method to initialize a different version ofConnectionTable. |
getOpenConnections | public int getOpenConnections()(Code) | | |
setProperties | public boolean setProperties(Properties props)(Code) | | Setup the Protocol instance acording to the configuration string
|
Methods inherited from org.jgroups.protocols.BasicTCP | public long getConnExpireTime()(Code)(Java Doc) public int getEndPort()(Code)(Java Doc) public String getInfo()(Code)(Java Doc) public long getReaperInterval()(Code)(Java Doc) public int getStartPort()(Code)(Java Doc) protected void handleDownEvent(Event evt)(Code)(Java Doc) public void init() throws Exception(Code)(Java Doc) public void postUnmarshalling(Message msg, Address dest, Address src, boolean multicast)(Code)(Java Doc) public void postUnmarshallingList(Message msg, Address dest, boolean multicast)(Code)(Java Doc) abstract public String printConnections()(Code)(Java Doc) public void receive(Address sender, byte[] data, int offset, int length)(Code)(Java Doc) abstract public void retainAll(Collection members)(Code)(Java Doc) abstract public void send(Address dest, byte[] data, int offset, int length) throws Exception(Code)(Java Doc) public void sendToAllMembers(byte[] data, int offset, int length) throws Exception(Code)(Java Doc) public void sendToSingleMember(Address dest, byte[] data, int offset, int length) throws Exception(Code)(Java Doc) public void setConnExpireTime(long conn_expire_time)(Code)(Java Doc) public void setEndPort(int end_port)(Code)(Java Doc) public boolean setProperties(Properties props)(Code)(Java Doc) public void setReaperInterval(long reaper_interval)(Code)(Java Doc) public void setStartPort(int start_port)(Code)(Java Doc)
|
Methods inherited from org.jgroups.protocols.TP | public void down(Event evt)(Code)(Java Doc) public Map dumpStats()(Code)(Java Doc) public String getBindAddress()(Code)(Java Doc) public boolean getBindToAllInterfaces()(Code)(Java Doc) public String getChannelName()(Code)(Java Doc) public int getIncomingQueueSize()(Code)(Java Doc) abstract public String getInfo()(Code)(Java Doc) public Address getLocalAddress()(Code)(Java Doc) public int getMaxBundleSize()(Code)(Java Doc) public long getMaxBundleTimeout()(Code)(Java Doc) public long getNumBytesReceived()(Code)(Java Doc) public long getNumBytesSent()(Code)(Java Doc) public long getNumMessagesReceived()(Code)(Java Doc) public long getNumMessagesSent()(Code)(Java Doc) public int getOutgoingQueueMaxSize()(Code)(Java Doc) public int getOutgoingQueueSize()(Code)(Java Doc) public java.util.List getReceiveInterfaces()(Code)(Java Doc) public java.util.List getSendInterfaces()(Code)(Java Doc) protected void handleConfigEvent(HashMap map)(Code)(Java Doc) protected void handleDownEvent(Event evt)(Code)(Java Doc) public void init() throws Exception(Code)(Java Doc) public boolean isDiscardIncompatiblePackets()(Code)(Java Doc) public boolean isEnableBundling()(Code)(Java Doc) public boolean isLoopback()(Code)(Java Doc) public boolean isReceiveOnAllInterfaces()(Code)(Java Doc) public boolean isSendOnAllInterfaces()(Code)(Java Doc) public boolean isUseIncomingPacketHandler()(Code)(Java Doc) public boolean isUseOutgoingPacketHandler()(Code)(Java Doc) abstract public void postUnmarshalling(Message msg, Address dest, Address src, boolean multicast)(Code)(Java Doc) abstract public void postUnmarshallingList(Message msg, Address dest, boolean multicast)(Code)(Java Doc) final protected void receive(Address dest, Address sender, byte[] data, int offset, int length)(Code)(Java Doc) public void resetStats()(Code)(Java Doc) abstract public void sendToAllMembers(byte[] data, int offset, int length) throws Exception(Code)(Java Doc) abstract public void sendToSingleMember(Address dest, byte[] data, int offset, int length) throws Exception(Code)(Java Doc) public void setBindAddress(String bind_addr) throws UnknownHostException(Code)(Java Doc) public void setBindToAllInterfaces(boolean flag)(Code)(Java Doc) public void setDiscardIncompatiblePackets(boolean flag)(Code)(Java Doc) public void setEnableBundling(boolean flag)(Code)(Java Doc) public void setLoopback(boolean b)(Code)(Java Doc) public void setMaxBundleSize(int size)(Code)(Java Doc) public void setMaxBundleTimeout(long timeout)(Code)(Java Doc) public void setOutgoingQueueMaxSize(int new_size)(Code)(Java Doc) public boolean setProperties(Properties props)(Code)(Java Doc) protected void setThreadNames()(Code)(Java Doc) public void start() throws Exception(Code)(Java Doc) public void startUpHandler()(Code)(Java Doc) public void stop()(Code)(Java Doc) public String toString()(Code)(Java Doc) protected void unsetThreadNames()(Code)(Java Doc) public void up(Event evt)(Code)(Java Doc)
|
|
|