@Override public boolean isCancelled() { return this.processor.isCancelled(); }
@Override public boolean isCancelled() { return this.processor.isCancelled(); }
@Override public boolean cancel(boolean mayInterruptIfRunning) { if (isCancelled()) { return false; } this.processor.cancel(); // isCancelled may still return false, if mono completed before the cancel return this.processor.isCancelled(); }
@Override public boolean isDisposed() { return isTerminated() || isCancelled(); }
@Override public boolean cancel(boolean mayInterruptIfRunning) { if (isCancelled()) { return false; } this.processor.cancel(); // isCancelled may still return false, if mono completed before the cancel return this.processor.isCancelled(); }
@Override @Nullable public Object scanUnsafe(Attr key) { //touch guard boolean t = isTerminated(); if (key == Attr.TERMINATED) return t; if (key == Attr.PARENT) return subscription; if (key == Attr.ERROR) return error; if (key == Attr.PREFETCH) return Integer.MAX_VALUE; if (key == Attr.CANCELLED) return isCancelled(); return null; }
@Test public void cancelComposes2() { AssertSubscriber<Integer> ts = AssertSubscriber.create(); MonoProcessor<Integer> sp = MonoProcessor.create(); sp.publish(o -> Mono.<Integer>empty()) .subscribe(ts); Assert.assertFalse("Still subscribed?", sp.isCancelled()); }
public boolean isCancelled() { return processor.isCancelled(); }
@Test public void cancelComposes() { AssertSubscriber<Integer> ts = AssertSubscriber.create(); MonoProcessor<Integer> sp = MonoProcessor.create(); sp.publish(o -> Mono.<Integer>never()) .subscribe(ts); Assert.assertTrue("Not subscribed?", sp.downstreamCount() != 0); ts.cancel(); Assert.assertFalse("Still subscribed?", sp.isCancelled()); }
public boolean isCancelled() { return processor.isCancelled(); }
@Override public boolean isCancelled() { return this.processor.isCancelled(); }
@Override public boolean isCancelled() { return this.processor.isCancelled(); }
@Override public boolean isCancelled() { return this.monoProcessor.isCancelled(); }
@Override public boolean isDisposed() { return isTerminated() || isCancelled(); }
@Override public boolean cancel(boolean mayInterruptIfRunning) { if (isCancelled()) { return false; } this.processor.cancel(); // isCancelled may still return false, if mono completed before the cancel return this.processor.isCancelled(); }
@Override @Nullable public Object scanUnsafe(Attr key) { //touch guard boolean t = isTerminated(); if (key == Attr.TERMINATED) return t; if (key == Attr.PARENT) return subscription; if (key == Attr.ERROR) return error; if (key == Attr.PREFETCH) return Integer.MAX_VALUE; if (key == Attr.CANCELLED) return isCancelled(); return null; }
@Override public boolean cancel(boolean mayInterruptIfRunning) { if (isCancelled()) { return false; } this.processor.cancel(); // isCancelled may still return false, if mono completed before the cancel return this.processor.isCancelled(); }