AbstractUnsafe.out() -> directOutbound()
- to avoid confusion between Channel.outbound()
This commit is contained in:
parent
f4c6bcafaf
commit
78974e85c5
@ -370,7 +370,7 @@ public abstract class AbstractChannel extends DefaultAttributeMap implements Cha
|
||||
private final Runnable flushLaterTask = new FlushLater();
|
||||
|
||||
@Override
|
||||
public ChannelBufferHolder<Object> out() {
|
||||
public ChannelBufferHolder<Object> directOutbound() {
|
||||
return outbound;
|
||||
}
|
||||
|
||||
@ -548,7 +548,7 @@ public abstract class AbstractChannel extends DefaultAttributeMap implements Cha
|
||||
if (eventLoop().inEventLoop()) {
|
||||
// Append flush future to the notification list.
|
||||
if (future != voidFuture) {
|
||||
long checkpoint = writeCounter + out().size();
|
||||
long checkpoint = writeCounter + directOutbound().size();
|
||||
if (future instanceof FlushCheckpoint) {
|
||||
FlushCheckpoint cp = (FlushCheckpoint) future;
|
||||
cp.flushCheckpoint(checkpoint);
|
||||
@ -602,7 +602,7 @@ public abstract class AbstractChannel extends DefaultAttributeMap implements Cha
|
||||
inFlushNow = true;
|
||||
try {
|
||||
Throwable cause = null;
|
||||
ChannelBufferHolder<Object> out = out();
|
||||
ChannelBufferHolder<Object> out = directOutbound();
|
||||
int oldSize = out.size();
|
||||
try {
|
||||
doFlush(out);
|
||||
|
@ -174,7 +174,7 @@ public interface Channel extends AttributeMap, ChannelOutboundInvoker, ChannelFu
|
||||
Unsafe unsafe();
|
||||
|
||||
public interface Unsafe {
|
||||
ChannelBufferHolder<Object> out();
|
||||
ChannelBufferHolder<Object> directOutbound();
|
||||
ChannelFuture voidFuture();
|
||||
|
||||
SocketAddress localAddress();
|
||||
|
@ -585,7 +585,7 @@ public class DefaultChannelPipeline implements ChannelPipeline {
|
||||
if (ctx != null) {
|
||||
return ctx.outbound();
|
||||
}
|
||||
return channel().unsafe().out();
|
||||
return channel().unsafe().directOutbound();
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -1187,7 +1187,7 @@ public class DefaultChannelPipeline implements ChannelPipeline {
|
||||
for (;;) {
|
||||
ctx = nextOutboundContext(ctx.prev);
|
||||
if (ctx == null) {
|
||||
ChannelBufferHolder<Object> lastOut = channel().unsafe().out();
|
||||
ChannelBufferHolder<Object> lastOut = channel().unsafe().directOutbound();
|
||||
if (lastOut.hasByteBuffer()) {
|
||||
return lastOut.byteBuffer();
|
||||
} else {
|
||||
@ -1207,7 +1207,7 @@ public class DefaultChannelPipeline implements ChannelPipeline {
|
||||
for (;;) {
|
||||
ctx = nextOutboundContext(ctx.prev);
|
||||
if (ctx == null) {
|
||||
ChannelBufferHolder<Object> lastOut = channel().unsafe().out();
|
||||
ChannelBufferHolder<Object> lastOut = channel().unsafe().directOutbound();
|
||||
if (lastOut.hasMessageBuffer()) {
|
||||
return lastOut.messageBuffer();
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user