public abstract class Nono extends Object implements Publisher<Void>
Since this type never emits any value, the implementations ignore the downstream request and emit the terminal events even if there was no request (which is allowed by the Reactive-Streams specification).
Since there is no bottom type in Java (that is T is a subtype of all other types), Nono implements the Publisher interface via the Void type parameter.
Constructor and Description |
---|
Nono() |
Modifier and Type | Method and Description |
---|---|
static Nono |
amb(Iterable<? extends Nono> sources)
Returns a Nono that terminates when the first Nono from the
sources sequence terminates.
|
static Nono |
ambArray(Nono... sources)
Returns a Nono that terminates when the first Nono from the
array terminates.
|
Nono |
andThen(Nono other)
Run the other Nono when this Nono completes.
|
<T> Flowable<T> |
andThen(Publisher<? extends T> other)
When this Nono completes, it is continued by the events of
the other Publisher.
|
Throwable |
blockingAwait()
Blockingly await indefinitely the termination of this Nono and return
the Throwable if this Nono terminated with an error, null
otherwise.
|
Throwable |
blockingAwait(long timeout,
TimeUnit unit)
Blockingly await for the given timeout the termination of this Nono and return
the Throwable if this Nono terminated with an error, null
otherwise.
|
void |
blockingSubscribe()
Block until this Nono terminates and ignore the actual events.
|
void |
blockingSubscribe(Action onComplete)
Block until this Nono completes and call the Action on the thread
where the blocking happens.
|
void |
blockingSubscribe(Action onComplete,
Consumer<? super Throwable> onError)
Block until this Nono terminates and call the Action or Consumer
depending on the terminal event on the thread where the blocking
happens.
|
static int |
bufferSize()
Returns the default buffer or prefetch size.
|
Nono |
cache()
Caches the terminal event of the upstream Nono
and relays/replays it to Subscribers.
|
static Nono |
complete()
Returns a Nono that completes normally.
|
Nono |
compose(Function<? super Nono,? extends Nono> composer)
Compose operators fluently via a function callback that returns a Nono for
this Nono.
|
static Nono |
concat(Iterable<? extends Nono> sources)
Runs the Nono sources one after the other.
|
static Nono |
concat(Publisher<? extends Nono> sources)
Runs the Nono sources emitted by the Publisher one after the other.
|
static Nono |
concat(Publisher<? extends Nono> sources,
int prefetch)
Runs the Nono sources emitted by the Publisher one after the other,
prefetching the given number of Nono sources.
|
static Nono |
concatArray(Nono... sources)
Runs the Nono sources one after the other.
|
static Nono |
concatArrayDelayError(Nono... sources)
Runs the Nono sources one after the other, delaying errors from them
till all sources have terminated.
|
static Nono |
concatDelayError(Iterable<? extends Nono> sources)
Runs the Nono sources one after the other, delaying errors from them
till all sources have terminated.
|
static Nono |
concatDelayError(Publisher<? extends Nono> sources)
Runs the Nono sources emitted by the Publisher, one after the other, delaying errors from them
till all sources have terminated.
|
static Nono |
concatDelayError(Publisher<? extends Nono> sources,
int prefetch,
boolean tillTheEnd)
Runs the Nono sources emitted by the Publisher, one after the other, delaying errors from them
till all sources have terminated and prefetching Nonos from the upstream.
|
static Nono |
create(CompletableOnSubscribe onCreate)
Creates a Nono instance that when subscribed to, the given onCreate is
called for each individual subscriber to generate a terminal event
synchronously and synchronously in a cancellation-safe manner.
|
static Nono |
defer(Supplier<? extends Nono> supplier)
Defers the creation of the actual Nono instance until a subscriber
subscribes.
|
Nono |
delay(long delay,
TimeUnit unit)
Delay the emission of the terminal events of this Nono
by the given time amount.
|
Nono |
delay(long delay,
TimeUnit unit,
Scheduler scheduler)
Delay the emission of the terminal events of this Nono
by the given time amount.
|
Nono |
delaySubscription(long delay,
TimeUnit unit)
Delays the actual subscription to this Nono until the given
time passes.
|
Nono |
delaySubscription(long delay,
TimeUnit unit,
Scheduler scheduler)
Delays the actual subscription to this Nono until the given
time passes.
|
Nono |
delaySubscription(Publisher<?> other)
Delays the actual subscription to this Nono until the other
Publisher signals an item or completes.
|
Nono |
doAfterTerminate(Action onAfterTerminate)
Executes the callback after this Nono terminates and the downstream
is notified.
|
Nono |
doFinally(Action onFinally)
Executes the callback exactly if the upstream terminates or
the downstream cancels the sequence.
|
Nono |
doOnCancel(Action onCancel)
Executes the callback if the downstream cancels the sequence.
|
Nono |
doOnComplete(Action onComplete)
Executes a callback when the upstream completes normally.
|
Nono |
doOnError(Consumer<? super Throwable> onError)
Executes a callback when the upstream signals an error.
|
Nono |
doOnRequest(LongConsumer onRequest)
Executes the callback when the downstream requests from this Nolo.
|
Nono |
doOnSubscribe(Consumer<? super Subscription> onSubscribe)
Executes a callback when the upstream calls onSubscribe.
|
static Nono |
error(Supplier<? extends Throwable> errorSupplier)
Returns a Nono that signals a Throwable generated by the
supplier for each individual subscriber.
|
static Nono |
error(Throwable ex)
Returns a Nono that signals the given Throwable to all
subscribers.
|
<T> Flowable<T> |
flatMap(Function<? super Throwable,? extends Publisher<? extends T>> onErrorMapper,
Supplier<? extends Publisher<? extends T>> onCompleteMapper)
Maps the upstream completion or error into a Publisher and emit
its events as a Flowable.
|
static Nono |
fromAction(Action action)
Executes an action when a subscriber subscribes to the returned
Nono.
|
static Nono |
fromCompletable(CompletableSource source)
Wrap a Completable into a Nono and terminate when the
source Completable terminates.
|
static Nono |
fromFuture(Future<?> future)
Blockingly waits indefinitely for the given Future to terminate,
relaying any error the Future signals.
|
static Nono |
fromFuture(Future<?> future,
long timeout,
TimeUnit unit)
Blockingly waits the given Future for the given timeout to terminate,
relaying any error the Future signals.
|
static Nono |
fromMaybe(MaybeSource<?> source)
Wrap a Maybe, ignore its success value and terminate if
the source Maybe terminates.
|
static Nono |
fromObservable(ObservableSource<?> source)
Wrap a general Observable, ignore all of its values and terminate if
the source Observable terminates.
|
static Nono |
fromPublisher(Publisher<?> source)
Wrap a general Publisher, ignore all of its values and terminate if
the source Publisher terminates.
|
static Nono |
fromSingle(SingleSource<?> source)
Wrap a Single, ignore its success value and terminate if
the source Single terminates.
|
static Function<Nono,Nono> |
getOnAssemblyHandler()
Returns the current onAssembly handler function or null if not set.
|
Nono |
hide()
Hides the identity of this Nono.
|
Nono |
lift(Function<Subscriber<? super Void>,Subscriber<? super Void>> lifter)
Transform the downstream's Subscriber into a Subscriber for the upstream
via a function.
|
Nono |
mapError(Function<? super Throwable,? extends Throwable> mapper)
Maps the upstream error into another Throwable via a function.
|
static Nono |
merge(Iterable<? extends Nono> sources)
Runs all Nono sources at once and completes once all of them complete.
|
static Nono |
merge(Iterable<? extends Nono> sources,
int maxConcurrency)
Runs the maximum number of Nono sources at once and completes when all source
Nono complete.
|
static Nono |
merge(Publisher<? extends Nono> sources)
Runs all Nono sources emitted by the Publisher at once and completes once all of them complete.
|
static Nono |
merge(Publisher<? extends Nono> sources,
int maxConcurrency)
Runs the maximum number of Nono sources emitted by the Publisher at once and completes when all source
Nono complete.
|
static Nono |
mergeArray(int maxConcurrency,
Nono... sources)
Runs the maximum number of Nono sources at once and completes when all source
Nono complete.
|
static Nono |
mergeArray(Nono... sources)
Runs all Nono sources at once and completes once all of them complete.
|
static Nono |
mergeArrayDelayError(int maxConcurrency,
Nono... sources)
Runs the maximum number of Nono sources at once and terminates when all source
Nono terminate, delaying errors in the process.
|
static Nono |
mergeArrayDelayError(Nono... sources)
Runs all Nono sources at once and terminates once all
of them terminate, delaying errors in the process.
|
static Nono |
mergeDelayError(Iterable<? extends Nono> sources)
Runs all Nono sources at once and terminates once all of them terminate,
delaying errors in the process.
|
static Nono |
mergeDelayError(Iterable<? extends Nono> sources,
int maxConcurrency)
Runs the maximum number of Nono sources at once and terminates when all source
Nono terminate, delaying errors in the process.
|
static Nono |
mergeDelayError(Publisher<? extends Nono> sources)
Runs all Nono sources emitted by the Publisher at once and terminates
once all of them terminate, delaying errors in the process.
|
static Nono |
mergeDelayError(Publisher<? extends Nono> sources,
int maxConcurrency)
Runs the maximum number of Nono sources emitted by the Publisher
at once and terminates when all source Nono terminate,
delaying errors in the process.
|
static Nono |
never()
Returns a Nono that never terminates.
|
Nono |
observeOn(Scheduler scheduler)
Observes the onError and onComplete events on the specified
Scheduler.
|
protected static Nono |
onAssembly(Nono source)
Optionally apply a function to the raw source and return a
potentially modified Nono instance.
|
Nono |
onErrorComplete()
If this Nono signals an error, signal an onComplete instead.
|
Nono |
onErrorResumeNext(Function<? super Throwable,? extends Nono> errorHandler)
If this Nono signals an error, subscribe to the fallback Nono
returned by the error handler function.
|
Nono |
repeat()
Repeatedly run this Nono indefinitely.
|
Nono |
repeat(BooleanSupplier stop)
Repeat until the given BooleanSupplier returns true.
|
Nono |
repeat(long times)
Repeatedly run this Nono at most the given number of times.
|
Nono |
repeatWhen(Function<? super Flowable<Object>,? extends Publisher<?>> handler)
Repeat when the Publisher returned by the handler function signals
a value or terminate accordingly.
|
Nono |
retry()
Repeatedly run this Nono indefinitely if it fails.
|
Nono |
retry(long times)
Repeatedly run this Nono at most the given number of times if it fails.
|
Nono |
retry(Predicate<? super Throwable> predicate)
Retry a failed Nono if the predicate return true.
|
Nono |
retryWhen(Function<? super Flowable<Throwable>,? extends Publisher<?>> handler)
Retry this Nono when the Publisher returned by the handler function
signals a normal item or terminate if the Publisher terminates.
|
static void |
setOnAssemblyHandler(Function<Nono,Nono> handler)
Sets the onAssembly handler.
|
Disposable |
subscribe()
Subscribe to this Nono and ignore the events it produces.
|
Disposable |
subscribe(Action onComplete)
Subscribe to this Nono and execute the given action if this Nono
completes.
|
Disposable |
subscribe(Action onComplete,
Consumer<? super Throwable> onError)
Subscribe to this Nono and execute the given action if this Nono
completes or call the consumer if this Nono terminates with an error.
|
void |
subscribe(Subscriber<? super Void> s) |
protected abstract void |
subscribeActual(Subscriber<? super Void> s)
Implement this method to signal the terminal events to the given subscriber.
|
Nono |
subscribeOn(Scheduler scheduler)
Subscribes to the upstream on the specified Scheduler.
|
<T,E extends Subscriber<T>> |
subscribeWith(E subscriber)
Subscribe with the given subscriber and return the same subscriber, allowing
chaining methods on it or fluently reusing the instance.
|
Nono |
takeUntil(Publisher<?> other)
Run this Nono and cancel it when the other Publisher signals
an item or completes.
|
TestSubscriber<Void> |
test()
Create a TestSubscriber, subscribe it to this Nono and return
the TestSubscriber itself.
|
TestSubscriber<Void> |
test(boolean cancelled)
Create a TestSubscriber, optionally cancel it, subscribe it to this Nono and return
the TestSubscriber itself.
|
Nono |
timeout(long timeout,
TimeUnit unit)
Signals a TimeoutException if this Nono doesn't complete
within the specified timeout.
|
Nono |
timeout(long timeout,
TimeUnit unit,
Nono fallback)
Switches to the fallback Nono if this Nono doesn't complete
within the specified timeout.
|
Nono |
timeout(long timeout,
TimeUnit unit,
Scheduler scheduler)
Signals a TimeoutException if this Nono doesn't complete
within the specified timeout.
|
Nono |
timeout(long timeout,
TimeUnit unit,
Scheduler scheduler,
Nono fallback)
Switches to the fallback Nono if this Nono doesn't complete
within the specified timeout.
|
Nono |
timeout(Publisher<?> other)
Signal a TimeoutException if the other Publisher signals an item
or completes before this Nono completes.
|
Nono |
timeout(Publisher<?> other,
Nono fallback)
Switch to the fallback Nono if the other Publisher signals an
item or completes before this Nono completes.
|
static Nono |
timer(long delay,
TimeUnit unit)
Completes after the specified amount of time on the computation scheduler.
|
static Nono |
timer(long delay,
TimeUnit unit,
Scheduler scheduler)
Completes after the specified amount of time on the specified scheduler.
|
<R> R |
to(Function<? super Nono,R> converter)
Fluently convert this Nono via a function callback into some type.
|
Completable |
toCompletable()
Convert this Nono instance into a Completable.
|
<T> Flowable<T> |
toFlowable()
Convert this Nono instance into a Flowable that only terminates.
|
Future<Void> |
toFuture()
Converts this Nono into a Future and signals its single
value.
|
<T> Maybe<T> |
toMaybe()
Convert this Nono instance into a Maybe that only terminates.
|
<T> Observable<T> |
toObservable()
Convert this Nono instance into an Observable that only terminates.
|
<T> Perhaps<T> |
toPerhaps()
Convert this Nono instance into a Perhaps that only terminates.
|
Nono |
unsubscribeOn(Scheduler scheduler)
If the downstream cancels the sequence, the cancellation towards
the upstream will happen on the specified Scheduler.
|
static <R> Nono |
using(Supplier<R> resourceSupplier,
Function<? super R,? extends Nono> sourceSupplier,
Consumer<? super R> disposer)
Generate a resource and a Nono based on that resource and then
dispose that resource eagerly when the Nono terminates or the
downstream cancels the sequence.
|
static <R> Nono |
using(Supplier<R> resourceSupplier,
Function<? super R,? extends Nono> sourceSupplier,
Consumer<? super R> disposer,
boolean eager)
Generate a resource and a Nono based on that resource and then
dispose that resource optionally eagerly when the Nono terminates or the
downstream cancels the sequence.
|
public static int bufferSize()
protected static Nono onAssembly(Nono source)
source
- the source to apply topublic static Function<Nono,Nono> getOnAssemblyHandler()
public static void setOnAssemblyHandler(Function<Nono,Nono> handler)
handler
- the new onAssembly handler, null clears the handlerpublic static Nono create(CompletableOnSubscribe onCreate)
onCreate
- called for each individual subscriber with the abstraction
of the incoming Subscriberpublic static Nono complete()
public static Nono never()
public static Nono error(Throwable ex)
ex
- the Throwable to signal, not nullpublic static Nono error(Supplier<? extends Throwable> errorSupplier)
errorSupplier
- the Throwable error supplier, not nullpublic static Nono defer(Supplier<? extends Nono> supplier)
supplier
- the supplier of Nono instances for each individual
subscriber.public static Nono fromAction(Action action)
action
- the action to execute, not nullpublic static Nono fromFuture(Future<?> future)
future
- the future to awaitpublic static Nono fromFuture(Future<?> future, long timeout, TimeUnit unit)
future
- the future to awaittimeout
- the timeout value to wait for terminationunit
- the unit for the timeout parameterpublic static Nono amb(Iterable<? extends Nono> sources)
sources
- the Iterable sequence of sourcespublic static Nono ambArray(Nono... sources)
sources
- the array of sourcespublic static Nono concat(Iterable<? extends Nono> sources)
sources
- the Iterable sequence of sourcespublic static Nono concat(Publisher<? extends Nono> sources)
sources
- the Publisher of Nono sourcespublic static Nono concat(Publisher<? extends Nono> sources, int prefetch)
sources
- the Publisher of Nono sourcesprefetch
- the number of Nono sources to prefetch from upstreampublic static Nono concatArray(Nono... sources)
sources
- the array of sourcespublic static Nono concatDelayError(Iterable<? extends Nono> sources)
sources
- the Iterable sequence of sourcespublic static Nono concatDelayError(Publisher<? extends Nono> sources)
sources
- the Publisher of source Nonospublic static Nono concatDelayError(Publisher<? extends Nono> sources, int prefetch, boolean tillTheEnd)
sources
- the Publisher of source Nonosprefetch
- the number of Nonos to prefetch from the upstreamtillTheEnd
- if true the errors from the source are also delayed till the end;
if false, error(s) are emitted when an inner Nono source terminatespublic static Nono concatArrayDelayError(Nono... sources)
sources
- the array of sourcespublic static Nono merge(Iterable<? extends Nono> sources)
sources
- the Iterable sequence of Nono sourcespublic static Nono merge(Iterable<? extends Nono> sources, int maxConcurrency)
sources
- the Iterable sequence of Nono sourcesmaxConcurrency
- the maximum number of active Nono sources at a given timepublic static Nono merge(Publisher<? extends Nono> sources)
sources
- the Publisher of Nono sourcespublic static Nono merge(Publisher<? extends Nono> sources, int maxConcurrency)
sources
- the Publisher of Nono sourcesmaxConcurrency
- the maximum number of active Nono sources at a given timepublic static Nono mergeArray(Nono... sources)
sources
- the array of Nono sourcespublic static Nono mergeArray(int maxConcurrency, Nono... sources)
sources
- the array of Nono sourcesmaxConcurrency
- the maximum number of active Nono sources at a given timepublic static Nono mergeDelayError(Iterable<? extends Nono> sources)
sources
- the Iterable sequence of Nono sourcespublic static Nono mergeDelayError(Iterable<? extends Nono> sources, int maxConcurrency)
sources
- the Iterable sequence of Nono sourcesmaxConcurrency
- the maximum number of active Nono sources at a given timepublic static Nono mergeDelayError(Publisher<? extends Nono> sources)
sources
- the Publisher of Nono sourcespublic static Nono mergeDelayError(Publisher<? extends Nono> sources, int maxConcurrency)
sources
- the Publisher of Nono sourcesmaxConcurrency
- the maximum number of active Nono sources at a given timepublic static Nono mergeArrayDelayError(Nono... sources)
sources
- the array of Nono sourcespublic static Nono mergeArrayDelayError(int maxConcurrency, Nono... sources)
sources
- the array of Nono sourcesmaxConcurrency
- the maximum number of active Nono sources at a given time@SchedulerSupport(value="io.reactivex:computation") public static Nono timer(long delay, TimeUnit unit)
delay
- the delay valueunit
- the delay time unit@SchedulerSupport(value="custom") public static Nono timer(long delay, TimeUnit unit, Scheduler scheduler)
delay
- the delay valueunit
- the delay time unitscheduler
- the scheduler to delay the completion signalpublic static <R> Nono using(Supplier<R> resourceSupplier, Function<? super R,? extends Nono> sourceSupplier, Consumer<? super R> disposer)
R
- the resource typeresourceSupplier
- the callback to get a resource for each subscribersourceSupplier
- the function that returns a Nono for the generated resourcedisposer
- the consumer of the resource once the upstream terminates or the
downstream cancelspublic static <R> Nono using(Supplier<R> resourceSupplier, Function<? super R,? extends Nono> sourceSupplier, Consumer<? super R> disposer, boolean eager)
R
- the resource typeresourceSupplier
- the callback to get a resource for each subscribersourceSupplier
- the function that returns a Nono for the generated resourcedisposer
- the consumer of the resource once the upstream terminates or the
downstream cancelseager
- if true, the resource is disposed before the terminal event is emitted
if false, the resource is disposed after the terminal event has been emittedpublic static Nono fromPublisher(Publisher<?> source)
source
- the Publisher to wrap into a Nonopublic static Nono fromSingle(SingleSource<?> source)
source
- the SingleSource to wrap into a Nonopublic static Nono fromMaybe(MaybeSource<?> source)
source
- the MaybeSource to wrap into a Nonopublic static Nono fromCompletable(CompletableSource source)
source
- the MaybeSource to wrap into a Nonopublic static Nono fromObservable(ObservableSource<?> source)
source
- the ObservableSource to wrap into a Nonopublic final <T> Flowable<T> andThen(Publisher<? extends T> other)
T
- the value type of the other Publisherother
- the other Publisher to continue withpublic final Nono andThen(Nono other)
other
- the other Nono to continue with.@SchedulerSupport(value="io.reactivex:computation") public final Nono delay(long delay, TimeUnit unit)
delay
- the delay amountunit
- the time unit@SchedulerSupport(value="custom") public final Nono delay(long delay, TimeUnit unit, Scheduler scheduler)
delay
- the delay amountunit
- the time unitscheduler
- the scheduler to wait onpublic final Nono delaySubscription(Publisher<?> other)
other
- the other Publisher to await a signal frompublic final Nono delaySubscription(long delay, TimeUnit unit)
delay
- the delay amountunit
- the time unitpublic final Nono delaySubscription(long delay, TimeUnit unit, Scheduler scheduler)
delay
- the delay amountunit
- the time unitscheduler
- the scheduler to wait onpublic final Nono timeout(long timeout, TimeUnit unit)
timeout
- the timeout amountunit
- the time unitpublic final Nono timeout(long timeout, TimeUnit unit, Nono fallback)
timeout
- the timeout amountunit
- the time unitfallback
- the Nono to switch to if this Nono times outpublic final Nono timeout(long timeout, TimeUnit unit, Scheduler scheduler)
timeout
- the timeout amountunit
- the time unitscheduler
- the scheduler to wait onpublic final Nono timeout(long timeout, TimeUnit unit, Scheduler scheduler, Nono fallback)
timeout
- the timeout amountunit
- the time unitscheduler
- the scheduler to wait onfallback
- the Nono to switch to if this Nono times outpublic final Nono timeout(Publisher<?> other)
other
- the other Publisher instancepublic final Nono timeout(Publisher<?> other, Nono fallback)
other
- the other Publisher instancefallback
- the fallback Nono instancepublic final Nono onErrorComplete()
public final Nono onErrorResumeNext(Function<? super Throwable,? extends Nono> errorHandler)
errorHandler
- the function called with the error and should
return a Nono to resume with.public final Nono mapError(Function<? super Throwable,? extends Throwable> mapper)
mapper
- the function that receives the upstream Throwable
and should return another Throwable to be emitted to downstreampublic final <T> Flowable<T> flatMap(Function<? super Throwable,? extends Publisher<? extends T>> onErrorMapper, Supplier<? extends Publisher<? extends T>> onCompleteMapper)
T
- the value typeonErrorMapper
- the function that receives the upstream error and
returns a Publisher to emit events ofonCompleteMapper
- the supplier that returns a Publisher to emit
events ofpublic final Nono compose(Function<? super Nono,? extends Nono> composer)
composer
- the function receiving this and returns a Nonopublic final <R> R to(Function<? super Nono,R> converter)
R
- the result value typeconverter
- the function receiving this and returning a valuepublic final Nono lift(Function<Subscriber<? super Void>,Subscriber<? super Void>> lifter)
lifter
- the function receiving the downstream Subscriber and returns a Subscriber
for the upstream.public final <T> Flowable<T> toFlowable()
T
- the value typepublic final <T> Observable<T> toObservable()
T
- the value typepublic final Completable toCompletable()
public final <T> Maybe<T> toMaybe()
T
- the value typepublic final <T> Perhaps<T> toPerhaps()
T
- the value typepublic final Nono subscribeOn(Scheduler scheduler)
scheduler
- the Scheduler to subscribe onpublic final Nono observeOn(Scheduler scheduler)
scheduler
- the Scheduler to emit terminal events onpublic final Nono unsubscribeOn(Scheduler scheduler)
scheduler
- the Scheduler to cancel onpublic final Nono doOnComplete(Action onComplete)
onComplete
- the consumer called before the completion event
is emitted to the downstream.public final Nono doOnError(Consumer<? super Throwable> onError)
onError
- the consumer called before the error is emitted to
the downstreampublic final Nono doOnSubscribe(Consumer<? super Subscription> onSubscribe)
onSubscribe
- the consumer called with the upstream Subscriptionpublic final Nono doOnRequest(LongConsumer onRequest)
onRequest
- the callback called with the request amountpublic final Nono doAfterTerminate(Action onAfterTerminate)
onAfterTerminate
- the callback to call after the downstream is notifiedpublic final Nono doFinally(Action onFinally)
onFinally
- the action to callpublic final Nono doOnCancel(Action onCancel)
onCancel
- the action to callpublic final Nono repeat()
public final Nono repeat(long times)
times
- the repeat countpublic final Nono repeat(BooleanSupplier stop)
stop
- the boolean supplier to return null to stop repeatingpublic final Nono repeatWhen(Function<? super Flowable<Object>,? extends Publisher<?>> handler)
handler
- the Function that receives a Flowable that emits an object
when this Nono completes normally and should return a Publisher that if
signals a normal item, it triggers a resubscription to this Nono.public final Nono retry()
public final Nono retry(long times)
times
- the repeat countpublic final Nono retry(Predicate<? super Throwable> predicate)
predicate
- the predicate receiving the failure Throwable and
returns true to trigger a retry.public final Nono retryWhen(Function<? super Flowable<Throwable>,? extends Publisher<?>> handler)
handler
- the Function that receives a Flowable of the failure Throwable
and returns a Publisher that if signals a normal item, it triggers a
resubscription.public final Nono hide()
This also breaks optimizations such as operator fusion - useful when diagnosing issues.
public final Nono takeUntil(Publisher<?> other)
other
- the other Publisherpublic final Nono cache()
public final void subscribe(Subscriber<? super Void> s)
protected abstract void subscribeActual(Subscriber<? super Void> s)
s
- the downstream subscriber, not null@SchedulerSupport(value="none") public final <T,E extends Subscriber<T>> E subscribeWith(E subscriber)
T
- the target value type of the subscriberE
- the subscriber's (sub)typesubscriber
- the subscriber to subscribe with, not null@SchedulerSupport(value="none") public final TestSubscriber<Void> test()
@SchedulerSupport(value="none") public final TestSubscriber<Void> test(boolean cancelled)
cancelled
- shoud the TestSubscriber be cancelled before the subscription@SchedulerSupport(value="none") public final Throwable blockingAwait()
@SchedulerSupport(value="none") public final Throwable blockingAwait(long timeout, TimeUnit unit)
timeout
- the timeout valueunit
- the time unitpublic final Disposable subscribe()
@SchedulerSupport(value="none") public final Disposable subscribe(Action onComplete)
onComplete
- the callback Action to be called when this Nono
completes@SchedulerSupport(value="none") public final Disposable subscribe(Action onComplete, Consumer<? super Throwable> onError)
onComplete
- the callback Action to be called when this Nono
completesonError
- the callback Consumer to be called with the terminal
error.public final void blockingSubscribe()
public final void blockingSubscribe(Action onComplete)
onComplete
- the Action to call when this Nono terminatespublic final void blockingSubscribe(Action onComplete, Consumer<? super Throwable> onError)
onComplete
- the Action to call when this Nono completesonError
- the Consumer to call when this Nono terminates with an error