未验证 提交 9a9039e8 编写于 作者: H Heng Du 提交者: GitHub

Merge pull request #3032 from messense/upgrade-netty-all

[ISSUE #3031] Upgrade netty-all dependency version to 4.1.65.Final
......@@ -53,6 +53,11 @@ public class ManyMessageTransfer extends AbstractReferenceCounted implements Fil
return transferred;
}
@Override
public long transferred() {
return transferred;
}
@Override
public long count() {
return byteBufferHeader.limit() + this.getMessageResult.getBufferTotalSize();
......@@ -76,6 +81,28 @@ public class ManyMessageTransfer extends AbstractReferenceCounted implements Fil
return 0;
}
@Override
public FileRegion retain() {
super.retain();
return this;
}
@Override
public FileRegion retain(int increment) {
super.retain(increment);
return this;
}
@Override
public FileRegion touch() {
return this;
}
@Override
public FileRegion touch(Object hint) {
return this;
}
public void close() {
this.deallocate();
}
......
......@@ -47,6 +47,11 @@ public class OneMessageTransfer extends AbstractReferenceCounted implements File
return transferred;
}
@Override
public long transferred() {
return transferred;
}
@Override
public long count() {
return this.byteBufferHeader.limit() + this.selectMappedBufferResult.getSize();
......@@ -65,6 +70,28 @@ public class OneMessageTransfer extends AbstractReferenceCounted implements File
return 0;
}
@Override
public FileRegion retain() {
super.retain();
return this;
}
@Override
public FileRegion retain(int increment) {
super.retain(increment);
return this;
}
@Override
public FileRegion touch() {
return this;
}
@Override
public FileRegion touch(Object hint) {
return this;
}
public void close() {
this.deallocate();
}
......
......@@ -53,6 +53,11 @@ public class QueryMessageTransfer extends AbstractReferenceCounted implements Fi
return transferred;
}
@Override
public long transferred() {
return transferred;
}
@Override
public long count() {
return byteBufferHeader.limit() + this.queryMessageResult.getBufferTotalSize();
......@@ -76,6 +81,28 @@ public class QueryMessageTransfer extends AbstractReferenceCounted implements Fi
return 0;
}
@Override
public FileRegion retain() {
super.retain();
return this;
}
@Override
public FileRegion retain(int increment) {
super.retain(increment);
return this;
}
@Override
public FileRegion touch() {
return this;
}
@Override
public FileRegion touch(Object hint) {
return this;
}
public void close() {
this.deallocate();
}
......
......@@ -537,7 +537,7 @@
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-all</artifactId>
<version>4.0.42.Final</version>
<version>4.1.65.Final</version>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
......
......@@ -52,6 +52,8 @@ public class NettyLogger {
private InternalLogger logger = null;
private static final String EXCEPTION_MESSAGE = "Unexpected exception:";
public NettyBridgeLogger(String name) {
logger = InternalLoggerFactory.getLogger(name);
}
......@@ -161,6 +163,25 @@ public class NettyLogger {
}
}
@Override
public void log(InternalLogLevel internalLogLevel, Throwable throwable) {
if (internalLogLevel.equals(InternalLogLevel.DEBUG)) {
logger.debug(EXCEPTION_MESSAGE, throwable);
}
if (internalLogLevel.equals(InternalLogLevel.TRACE)) {
logger.info(EXCEPTION_MESSAGE, throwable);
}
if (internalLogLevel.equals(InternalLogLevel.INFO)) {
logger.info(EXCEPTION_MESSAGE, throwable);
}
if (internalLogLevel.equals(InternalLogLevel.WARN)) {
logger.warn(EXCEPTION_MESSAGE, throwable);
}
if (internalLogLevel.equals(InternalLogLevel.ERROR)) {
logger.error(EXCEPTION_MESSAGE, throwable);
}
}
@Override
public boolean isTraceEnabled() {
return isEnabled(InternalLogLevel.TRACE);
......@@ -191,6 +212,11 @@ public class NettyLogger {
logger.info(var1, var2);
}
@Override
public void trace(Throwable var1) {
logger.info(EXCEPTION_MESSAGE, var1);
}
@Override
public boolean isDebugEnabled() {
return isEnabled(InternalLogLevel.DEBUG);
......@@ -221,6 +247,11 @@ public class NettyLogger {
logger.debug(var1, var2);
}
@Override
public void debug(Throwable var1) {
logger.debug(EXCEPTION_MESSAGE, var1);
}
@Override
public boolean isInfoEnabled() {
return isEnabled(InternalLogLevel.INFO);
......@@ -251,6 +282,11 @@ public class NettyLogger {
logger.info(var1, var2);
}
@Override
public void info(Throwable var1) {
logger.info(EXCEPTION_MESSAGE, var1);
}
@Override
public boolean isWarnEnabled() {
return isEnabled(InternalLogLevel.WARN);
......@@ -281,6 +317,11 @@ public class NettyLogger {
logger.warn(var1, var2);
}
@Override
public void warn(Throwable var1) {
logger.warn(EXCEPTION_MESSAGE, var1);
}
@Override
public boolean isErrorEnabled() {
return isEnabled(InternalLogLevel.ERROR);
......@@ -310,6 +351,11 @@ public class NettyLogger {
public void error(String var1, Throwable var2) {
logger.error(var1, var2);
}
@Override
public void error(Throwable var1) {
logger.error(EXCEPTION_MESSAGE, var1);
}
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册