本文整理了Java中org.jboss.netty.channel.WriteCompletionEvent.getWrittenAmount()
方法的一些代码示例,展示了WriteCompletionEvent.getWrittenAmount()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WriteCompletionEvent.getWrittenAmount()
方法的具体详情如下:
包路径:org.jboss.netty.channel.WriteCompletionEvent
类名称:WriteCompletionEvent
方法名:getWrittenAmount
[英]Returns the amount of data written.
[中]返回写入的数据量。
代码示例来源:origin: io.netty/netty
@Override
public void writeComplete(ChannelHandlerContext ctx, WriteCompletionEvent e)
throws Exception {
if (e.getWrittenAmount() > 0) {
State state = (State) ctx.getAttachment();
state.lastWriteTime = System.currentTimeMillis();
}
ctx.sendUpstream(e);
}
代码示例来源:origin: biasedbit/netty-tutorials
@Override
public void writeComplete(ChannelHandlerContext ctx, WriteCompletionEvent e)
throws Exception {
super.writeComplete(ctx, e);
this.writtenBytes.addAndGet(e.getWrittenAmount());
}
代码示例来源:origin: net.sourceforge.openutils/flazr
@Override
public void writeComplete(final ChannelHandlerContext ctx, final WriteCompletionEvent e) throws Exception {
bytesWritten += e.getWrittenAmount();
super.writeComplete(ctx, e);
}
代码示例来源:origin: biasedbit/netty-tutorials
@Override
public void writeComplete(ChannelHandlerContext ctx, WriteCompletionEvent e)
throws Exception {
super.writeComplete(ctx, e);
this.writtenBytes.addAndGet(e.getWrittenAmount());
}
代码示例来源:origin: kaazing/gateway
@Override
public void writeComplete(ChannelHandlerContext ctx, WriteCompletionEvent e) throws Exception {
int writtenBytes = (int) e.getWrittenAmount();
session.increaseWrittenBytes(writtenBytes, currentTimeMillis());
}
代码示例来源:origin: cuixin/XGameEnginee
public void writeComplete(ChannelHandlerContext ctx, WriteCompletionEvent e) throws Exception {
if (writeBytesCount.addAndGet(e.getWrittenAmount()) % M_DATA == 0)
logger.info("Write count is " + (writeBytesCount.get() / M_DATA) + 'M');
super.writeComplete(ctx, e);
}
}
代码示例来源:origin: gncloud/fastcatsearch
@Override
public void writeComplete(ChannelHandlerContext ctx, WriteCompletionEvent e)
throws Exception {
super.writeComplete(ctx, e);
this.writtenBytes.addAndGet(e.getWrittenAmount());
}
@Override
代码示例来源:origin: mconf/flazr
@Override
public void writeComplete(final ChannelHandlerContext ctx, final WriteCompletionEvent e) throws Exception {
bytesWritten += e.getWrittenAmount();
super.writeComplete(ctx, e);
}
代码示例来源:origin: org.elasticsearch.plugin/transport-netty3-client
@Override
public void writeComplete(ChannelHandlerContext ctx, WriteCompletionEvent e) throws Exception {
transportServiceAdapter.addBytesSent(e.getWrittenAmount());
super.writeComplete(ctx, e);
}
内容来源于网络,如有侵权,请联系作者删除!