Commit 592643e1 authored by Michi Mutsuzaki's avatar Michi Mutsuzaki
Browse files

ZOOKEEPER-1715. Upgrade netty version (Sean Bridges via michim)


git-svn-id: https://svn.apache.org/repos/asf/zookeeper/branches/branch-3.4@1550902 13f79535-47bb-0310-9956-ffa450edef68
parent 51789dc4
......@@ -219,6 +219,8 @@ IMPROVEMENTS:
ZOOKEEPER-1786. ZooKeeper data model documentation is incorrect
(Niraj Tolia via fpj)
ZOOKEEPER-1715. Upgrade netty version (Sean Bridges via michim)
Release 3.4.5 - 2012-09-30
Backward compatible changes:
......
......@@ -46,7 +46,7 @@
<dependency org="log4j" name="log4j" rev="1.2.16" transitive="false" conf="default"/>
<dependency org="jline" name="jline" rev="0.9.94" transitive="false" conf="default"/>
<dependency org="org.jboss.netty" name="netty" conf="default" rev="3.2.2.Final">
<dependency org="io.netty" name="netty" conf="default" rev="3.7.0.Final">
<artifact name="netty" type="jar" conf="default"/>
</dependency>
......
......@@ -155,9 +155,13 @@ public class NettyServerCnxn extends ServerCnxn {
ResumeMessageEvent(Channel channel) {
this.channel = channel;
}
@Override
public Object getMessage() {return null;}
@Override
public SocketAddress getRemoteAddress() {return null;}
@Override
public Channel getChannel() {return channel;}
@Override
public ChannelFuture getFuture() {return null;}
};
......@@ -739,7 +743,7 @@ public class NettyServerCnxn extends ServerCnxn {
zks.processPacket(this, bb);
if (zks.shouldThrottle(outstandingCount.incrementAndGet())) {
disableRecv();
disableRecvNoWait();
}
} else {
LOG.debug("got conn req request from "
......@@ -803,13 +807,17 @@ public class NettyServerCnxn extends ServerCnxn {
@Override
public void disableRecv() {
disableRecvNoWait().awaitUninterruptibly();
}
private ChannelFuture disableRecvNoWait() {
throttled = true;
if (LOG.isDebugEnabled()) {
LOG.debug("Throttling - disabling recv " + this);
}
channel.setReadable(false).awaitUninterruptibly();
return channel.setReadable(false);
}
@Override
public long getOutstandingRequests() {
return outstandingCount.longValue();
......@@ -832,6 +840,7 @@ public class NettyServerCnxn extends ServerCnxn {
/** Send close connection packet to the client.
*/
@Override
public void sendCloseSession() {
sendBuffer(ServerCnxnFactory.closeConn);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment