AbstractUnsafe.out() -> directOutbound()

- to avoid confusion between Channel.outbound()
This commit is contained in:
Trustin Lee 2012-05-30 00:38:23 -07:00
parent f4c6bcafaf
commit 78974e85c5
3 changed files with 7 additions and 7 deletions

View File

@ -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);

View File

@ -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();

View File

@ -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 {