Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/main/java/io/reactivex/CompletableEmitter.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ public interface CompletableEmitter {
void setCancellable(Cancellable c);

/**
* Returns true if the downstream cancelled the sequence.
* @return true if the downstream cancelled the sequence
* Returns true if the downstream disposed the sequence.
* @return true if the downstream disposed the sequence
*/
boolean isCancelled();
boolean isDisposed();
}
2 changes: 1 addition & 1 deletion src/main/java/io/reactivex/MaybeEmitter.java
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,5 @@ public interface MaybeEmitter<T> {
* Returns true if the downstream cancelled the sequence.
* @return true if the downstream cancelled the sequence
*/
boolean isCancelled();
boolean isDisposed();
}
10 changes: 5 additions & 5 deletions src/main/java/io/reactivex/ObservableEmitter.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@ public interface ObservableEmitter<T> extends Emitter<T> {
* @param c the cancellable resource, null is allowed
*/
void setCancellable(Cancellable c);

/**
* Returns true if the downstream cancelled the sequence.
* @return true if the downstream cancelled the sequence
* Returns true if the downstream disposed the sequence.
* @return true if the downstream disposed the sequence
*/
boolean isCancelled();
boolean isDisposed();

/**
* Ensures that calls to onNext, onError and onComplete are properly serialized.
* @return the serialized FlowableEmitter
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/io/reactivex/SingleEmitter.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,5 @@ public interface SingleEmitter<T> {
* Returns true if the downstream cancelled the sequence.
* @return true if the downstream cancelled the sequence
*/
boolean isCancelled();
boolean isDisposed();
}
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,6 @@ public void setCancellable(Cancellable c) {
setDisposable(new CancellableDisposable(c));
}

@Override
public boolean isCancelled() {
return DisposableHelper.isDisposed(get());
}

@Override
public void dispose() {
DisposableHelper.dispose(this);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,6 @@ public void setCancellable(Cancellable c) {
setDisposable(new CancellableDisposable(c));
}

@Override
public boolean isCancelled() {
return DisposableHelper.isDisposed(get());
}

@Override
public void dispose() {
DisposableHelper.dispose(this);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,6 @@ public void setCancellable(Cancellable c) {
setDisposable(new CancellableDisposable(c));
}

@Override
public boolean isCancelled() {
return isDisposed();
}

@Override
public ObservableEmitter<T> serialize() {
return new SerializedEmitter<T>(this);
Expand Down Expand Up @@ -152,7 +147,7 @@ public SerializedEmitter(ObservableEmitter<T> emitter) {

@Override
public void onNext(T t) {
if (emitter.isCancelled() || done) {
if (emitter.isDisposed() || done) {
return;
}
if (t == null) {
Expand All @@ -178,7 +173,7 @@ public void onNext(T t) {

@Override
public void onError(Throwable t) {
if (emitter.isCancelled() || done) {
if (emitter.isDisposed() || done) {
RxJavaPlugins.onError(t);
return;
}
Expand All @@ -195,7 +190,7 @@ public void onError(Throwable t) {

@Override
public void onComplete() {
if (emitter.isCancelled() || done) {
if (emitter.isDisposed() || done) {
return;
}
done = true;
Expand All @@ -216,7 +211,7 @@ void drainLoop() {
for (;;) {

for (;;) {
if (e.isCancelled()) {
if (e.isDisposed()) {
q.clear();
return;
}
Expand Down Expand Up @@ -270,8 +265,8 @@ public void setCancellable(Cancellable c) {
}

@Override
public boolean isCancelled() {
return emitter.isCancelled();
public boolean isDisposed() {
return emitter.isDisposed();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,6 @@ public void setCancellable(Cancellable c) {
setDisposable(new CancellableDisposable(c));
}

@Override
public boolean isCancelled() {
return DisposableHelper.isDisposed(get());
}

@Override
public void dispose() {
DisposableHelper.dispose(this);
Expand Down