mirror of https://github.com/apache/activemq.git
allow the TCP_NODELAY option to be configured
git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@436745 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
a420312a40
commit
d21381d21b
|
@ -65,6 +65,7 @@ public class TcpTransport extends TransportThreadSupport implements Transport, S
|
|||
protected boolean useLocalHost = true;
|
||||
protected int minmumWireFormatVersion;
|
||||
private Boolean keepAlive;
|
||||
private Boolean tcpNoDelay;
|
||||
|
||||
/**
|
||||
* Connect to a remote Node - e.g. a Broker
|
||||
|
@ -219,6 +220,17 @@ public class TcpTransport extends TransportThreadSupport implements Transport, S
|
|||
this.keepAlive = keepAlive;
|
||||
}
|
||||
|
||||
public Boolean getTcpNoDelay() {
|
||||
return tcpNoDelay;
|
||||
}
|
||||
|
||||
/**
|
||||
* Enable/disable the TCP_NODELAY option on the socket
|
||||
*/
|
||||
public void setTcpNoDelay(Boolean tcpNoDelay) {
|
||||
this.tcpNoDelay = tcpNoDelay;
|
||||
}
|
||||
|
||||
|
||||
// Implementation methods
|
||||
// -------------------------------------------------------------------------
|
||||
|
@ -252,6 +264,9 @@ public class TcpTransport extends TransportThreadSupport implements Transport, S
|
|||
if (keepAlive != null) {
|
||||
sock.setKeepAlive(keepAlive.booleanValue());
|
||||
}
|
||||
if (tcpNoDelay != null) {
|
||||
sock.setTcpNoDelay(tcpNoDelay.booleanValue());
|
||||
}
|
||||
}
|
||||
|
||||
protected void doStart() throws Exception {
|
||||
|
|
Loading…
Reference in New Issue