Rename method to better reflect usage

This commit is contained in:
Norman Maurer 2013-04-08 08:06:46 +02:00
parent 2508c76e97
commit 2a162eb140
2 changed files with 11 additions and 11 deletions

View File

@ -119,9 +119,9 @@ public final class ChannelFlushPromiseNotifier {
break; break;
} }
if (tryNotify) { if (tryNotify) {
cp.future().tryFailure(cause); cp.promise().tryFailure(cause);
} else { } else {
cp.future().setFailure(cause); cp.promise().setFailure(cause);
} }
} }
return this; return this;
@ -151,9 +151,9 @@ public final class ChannelFlushPromiseNotifier {
break; break;
} }
if (tryNotify) { if (tryNotify) {
cp.future().tryFailure(cause2); cp.promise().tryFailure(cause2);
} else { } else {
cp.future().setFailure(cause2); cp.promise().setFailure(cause2);
} }
} }
return this; return this;
@ -185,15 +185,15 @@ public final class ChannelFlushPromiseNotifier {
flushCheckpoints.remove(); flushCheckpoints.remove();
if (cause == null) { if (cause == null) {
if (tryNotify) { if (tryNotify) {
cp.future().trySuccess(); cp.promise().trySuccess();
} else { } else {
cp.future().setSuccess(); cp.promise().setSuccess();
} }
} else { } else {
if (tryNotify) { if (tryNotify) {
cp.future().tryFailure(cause); cp.promise().tryFailure(cause);
} else { } else {
cp.future().setFailure(cause); cp.promise().setFailure(cause);
} }
} }
} }
@ -213,7 +213,7 @@ public final class ChannelFlushPromiseNotifier {
interface FlushCheckpoint { interface FlushCheckpoint {
long flushCheckpoint(); long flushCheckpoint();
void flushCheckpoint(long checkpoint); void flushCheckpoint(long checkpoint);
ChannelPromise future(); ChannelPromise promise();
} }
private static class DefaultFlushCheckpoint implements FlushCheckpoint { private static class DefaultFlushCheckpoint implements FlushCheckpoint {
@ -236,7 +236,7 @@ public final class ChannelFlushPromiseNotifier {
} }
@Override @Override
public ChannelPromise future() { public ChannelPromise promise() {
return future; return future;
} }
} }

View File

@ -154,7 +154,7 @@ public class DefaultChannelPromise extends DefaultPromise<Void> implements Chann
} }
@Override @Override
public ChannelPromise future() { public ChannelPromise promise() {
return this; return this;
} }