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