| Modifier and Type | Interface and Description |
|---|---|
interface |
Completable<T>
A value that can be completed at a later point in time.
|
| Modifier and Type | Method and Description |
|---|---|
<T> Stage<T> |
Async.call(Callable<? extends T> callable)
Call the given callable on the default executor and track the result using a completable.
|
<T> Stage<T> |
Async.call(Callable<? extends T> callable,
ExecutorService executor)
Call the given callable on the provided executor and track the result using a completable.
|
<T> Stage<T> |
Async.cancelled()
Build an immediately cancelled completable.
|
<T> Stage<Collection<T>> |
Async.collect(Collection<? extends Stage<? extends T>> stages)
Build a new completable that is the result of collecting all the results in a collection.
|
<T,U> Stage<U> |
Async.collect(Collection<? extends Stage<? extends T>> stages,
Function<? super Collection<T>,? extends U> collector)
Build a new completable that is the result of reducing the provided collection of stages using
the provided collector.
|
default <T> Stage<Collection<T>> |
Async.collect(Stream<? extends Stage<T>> stream)
Collect the result of multiple stages from a stream.
|
Stage<Void> |
Async.collectAndDiscard(Collection<? extends Stage<?>> stages)
Collect the results from a collection of stages, then discard them.
|
default Stage<Void> |
Async.collectAndDiscard(Stream<? extends Stage<?>> stream)
Collect the results from a stream of stages, then discard them.
|
Stage<Void> |
Async.completed()
Returns an already completed void completable.
|
<T> Stage<T> |
Async.completed(T value)
Build an already completed completable.
|
<U> Stage<U> |
Managed.doto(Function<? super T,? extends Stage<U>> action)
Borrow a reference and execute the given action.
|
<T,U> Stage<U> |
Async.eventuallyCollect(Collection<? extends Callable<? extends Stage<? extends T>>> callables,
Consumer<? super T> consumer,
Supplier<? extends U> supplier,
int parallelism)
Collect the result from a collection of operations that are lazily created.
|
<T> Stage<T> |
Async.failed(Throwable e)
Build an already failed completable.
|
Stage<T> |
Stage.handle(Handle<? super T> handle)
Register a listener that is called on all three types of events for the current stage;
completed, failed, and cancelled.
|
Stage<Void> |
ReloadableManaged.reload()
Reload the underlying reference.
|
<T> Stage<RetryResult<T>> |
Async.retryUntilCompleted(Callable<? extends Stage<T>> callable,
RetryPolicy policy)
Retry the given action until it has been completed, or the provided
RetryPolicy expire. |
<T> Stage<RetryResult<T>> |
Async.retryUntilCompleted(Callable<? extends Stage<T>> callable,
RetryPolicy policy,
ClockSource clockSource)
Retry the given action until it has been completed, or the provided
RetryPolicy expire. |
Stage<Void> |
Managed.start()
Start the managed reference.
|
Stage<Void> |
Managed.stop()
Stop the underlying managed reference.
|
<T,U> Stage<U> |
Async.streamCollect(Collection<? extends Stage<? extends T>> stages,
Consumer<? super T> consumer,
Supplier<? extends U> supplier)
Build a new stage that is the result of applying a computation on a collection of stages.
|
<U> Stage<U> |
Stage.thenApply(Function<? super T,? extends U> fn)
Transform the value of the current stage into another type using an immediate function.
|
Stage<T> |
Stage.thenApplyFailed(Function<? super Throwable,? extends T> fn)
Apply a failed stage.
|
<U> Stage<U> |
Stage.thenCancel()
Build a stage is cancelled, but waits until the current stage completes.
|
<U> Stage<U> |
Stage.thenComplete(U result)
Build a stage is completed, but waits until the current stage completes.
|
<U> Stage<U> |
Stage.thenCompose(Function<? super T,? extends Stage<U>> fn)
Compose the current stage with the given function.
|
Stage<T> |
Stage.thenComposeCaught(Function<? super Throwable,? extends Stage<T>> fn)
Compose a failed stage.
|
<U> Stage<U> |
Stage.thenFail(Throwable cause)
Build a stage is failed, but waits until the current stage completes.
|
Stage<T> |
Stage.whenCancelled(Runnable runnable)
Register an listener to be called when the current stage is cancelled.
|
Stage<T> |
Stage.whenComplete(Consumer<? super T> consumer)
Register a listener to be called when the current stage is completed.
|
Stage<T> |
Stage.whenDone(Runnable runnable)
Register a listener to be called when the current stage finishes for any reason.
|
Stage<T> |
Stage.whenFailed(Consumer<? super Throwable> consumer)
Register a listener that is called when a stage is failed.
|
Stage<T> |
Stage.withCloser(Supplier<? extends Stage<Void>> complete,
Supplier<? extends Stage<Void>> notComplete)
Run one of the provided stages when this stage ends up in a given state.
|
Stage<T> |
Stage.withComplete(Supplier<? extends Stage<Void>> supplier)
Run the provided stage when the current stage has completed.
|
Stage<T> |
Stage.withNotComplete(Supplier<? extends Stage<Void>> supplier)
Run the provided stage when the current stage ends, but does not complete.
|
| Modifier and Type | Method and Description |
|---|---|
<T> Stage<Collection<T>> |
Async.collect(Collection<? extends Stage<? extends T>> stages)
Build a new completable that is the result of collecting all the results in a collection.
|
<T,U> Stage<U> |
Async.collect(Collection<? extends Stage<? extends T>> stages,
Function<? super Collection<T>,? extends U> collector)
Build a new completable that is the result of reducing the provided collection of stages using
the provided collector.
|
default <T> Stage<Collection<T>> |
Async.collect(Stream<? extends Stage<T>> stream)
Collect the result of multiple stages from a stream.
|
Stage<Void> |
Async.collectAndDiscard(Collection<? extends Stage<?>> stages)
Collect the results from a collection of stages, then discard them.
|
default Stage<Void> |
Async.collectAndDiscard(Stream<? extends Stage<?>> stream)
Collect the results from a stream of stages, then discard them.
|
<U> Stage<U> |
Managed.doto(Function<? super T,? extends Stage<U>> action)
Borrow a reference and execute the given action.
|
<T,U> Stage<U> |
Async.eventuallyCollect(Collection<? extends Callable<? extends Stage<? extends T>>> callables,
Consumer<? super T> consumer,
Supplier<? extends U> supplier,
int parallelism)
Collect the result from a collection of operations that are lazily created.
|
<T> Managed<T> |
Async.managed(Supplier<? extends Stage<T>> setup,
Function<? super T,? extends Stage<Void>> teardown)
Setup a managed reference.
|
<T> Managed<T> |
Async.managed(Supplier<? extends Stage<T>> setup,
Function<? super T,? extends Stage<Void>> teardown)
Setup a managed reference.
|
<T> ReloadableManaged<T> |
Async.reloadableManaged(Supplier<? extends Stage<T>> setup,
Function<? super T,? extends Stage<Void>> teardown)
Setup a reloadable, managed reference.
|
<T> ReloadableManaged<T> |
Async.reloadableManaged(Supplier<? extends Stage<T>> setup,
Function<? super T,? extends Stage<Void>> teardown)
Setup a reloadable, managed reference.
|
<T> Stage<RetryResult<T>> |
Async.retryUntilCompleted(Callable<? extends Stage<T>> callable,
RetryPolicy policy)
Retry the given action until it has been completed, or the provided
RetryPolicy expire. |
<T> Stage<RetryResult<T>> |
Async.retryUntilCompleted(Callable<? extends Stage<T>> callable,
RetryPolicy policy,
ClockSource clockSource)
Retry the given action until it has been completed, or the provided
RetryPolicy expire. |
<T,U> Stage<U> |
Async.streamCollect(Collection<? extends Stage<? extends T>> stages,
Consumer<? super T> consumer,
Supplier<? extends U> supplier)
Build a new stage that is the result of applying a computation on a collection of stages.
|
<U> Stage<U> |
Stage.thenCompose(Function<? super T,? extends Stage<U>> fn)
Compose the current stage with the given function.
|
Stage<T> |
Stage.thenComposeCaught(Function<? super Throwable,? extends Stage<T>> fn)
Compose a failed stage.
|
Stage<T> |
Stage.withCloser(Supplier<? extends Stage<Void>> complete,
Supplier<? extends Stage<Void>> notComplete)
Run one of the provided stages when this stage ends up in a given state.
|
Stage<T> |
Stage.withCloser(Supplier<? extends Stage<Void>> complete,
Supplier<? extends Stage<Void>> notComplete)
Run one of the provided stages when this stage ends up in a given state.
|
Stage<T> |
Stage.withComplete(Supplier<? extends Stage<Void>> supplier)
Run the provided stage when the current stage has completed.
|
Stage<T> |
Stage.withNotComplete(Supplier<? extends Stage<Void>> supplier)
Run the provided stage when the current stage ends, but does not complete.
|
Copyright © 2017. All rights reserved.