Modifier and Type | Interface and Description |
---|---|
interface |
Completable<T>
A value that can be completed at a later point in time.
|
Modifier and Type | Class and Description |
---|---|
class |
ConcurrentCompletable<T>
A concurrent implementation of
Completable . |
class |
ImmediateCancelled<T>
A stage which has already been cancelled.
|
class |
ImmediateCompleted<T>
A stage which has already been completed.
|
class |
ImmediateFailed<T>
A stage which has already failed.
|
Modifier and Type | Method and Description |
---|---|
<C> Stage<C> |
CoreAsync.call(Callable<? extends C> callable) |
<C> Stage<C> |
CoreAsync.call(Callable<? extends C> callable,
ExecutorService executor) |
<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> |
CoreAsync.cancelled() |
<T> Stage<T> |
Async.cancelled()
Build an immediately cancelled completable.
|
<C,T> Stage<T> |
CoreAsync.collect(Collection<? extends Stage<? extends C>> stages,
Function<? super Collection<C>,? extends T> collector) |
<T> Stage<Collection<T>> |
CoreAsync.collect(Collection<? extends Stage<? extends T>> stages) |
<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> |
CoreAsync.collectAndDiscard(Collection<? extends Stage<?>> stages) |
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> |
CoreAsync.completed() |
Stage<Void> |
Async.completed()
Returns an already completed void completable.
|
<T> Stage<T> |
CoreAsync.completed(T value) |
<T> Stage<T> |
Async.completed(T value)
Build an already completed completable.
|
<C> Stage<C> |
CoreAsync.doCall(Callable<? extends C> callable,
ExecutorService executor,
Completable<C> stage) |
protected <C,T> Stage<T> |
CoreAsync.doCollect(Collection<? extends Stage<? extends C>> stages,
Function<? super Collection<C>,? extends T> collector) |
<R> Stage<R> |
ConcurrentManaged.doto(Function<? super T,? extends Stage<R>> action) |
<U> Stage<U> |
Managed.doto(Function<? super T,? extends Stage<U>> action)
Borrow a reference and execute the given action.
|
<C,T> Stage<T> |
CoreAsync.eventuallyCollect(Collection<? extends Callable<? extends Stage<? extends C>>> callables,
Consumer<? super C> consumer,
Supplier<? extends T> supplier,
int parallelism) |
<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> |
CoreAsync.failed(Throwable e) |
<T> Stage<T> |
Async.failed(Throwable e)
Build an already failed completable.
|
Stage<T> |
ConcurrentCompletable.handle(Handle<? super T> handle) |
Stage<T> |
ImmediateCompleted.handle(Handle<? super T> handle) |
Stage<T> |
ImmediateFailed.handle(Handle<? super T> handle) |
Stage<T> |
ImmediateCancelled.handle(Handle<? super T> handle) |
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>> |
CoreAsync.retryUntilCompleted(Callable<? extends Stage<T>> callable,
RetryPolicy policy) |
<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>> |
CoreAsync.retryUntilCompleted(Callable<? extends Stage<T>> callable,
RetryPolicy policy,
ClockSource clockSource) |
<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> |
ConcurrentManaged.start() |
Stage<Void> |
Managed.start()
Start the managed reference.
|
Stage<Void> |
ConcurrentManaged.stop() |
Stage<Void> |
Managed.stop()
Stop the underlying managed reference.
|
<T,U> Stage<U> |
CoreAsync.streamCollect(Collection<? extends Stage<? extends T>> stages,
Consumer<? super T> consumer,
Supplier<? extends U> supplier) |
<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.
|
<R> Stage<R> |
ImmediateCompleted.thenApply(Function<? super T,? extends R> fn) |
<U> Stage<U> |
ConcurrentCompletable.thenApply(Function<? super T,? extends U> fn) |
<U> Stage<U> |
ImmediateFailed.thenApply(Function<? super T,? extends U> fn) |
<U> Stage<U> |
ImmediateCancelled.thenApply(Function<? super T,? extends U> fn) |
<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> |
ConcurrentCompletable.thenApplyFailed(Function<? super Throwable,? extends T> fn) |
Stage<T> |
ImmediateCompleted.thenApplyFailed(Function<? super Throwable,? extends T> fn) |
Stage<T> |
ImmediateFailed.thenApplyFailed(Function<? super Throwable,? extends T> fn) |
Stage<T> |
ImmediateCancelled.thenApplyFailed(Function<? super Throwable,? extends T> fn) |
Stage<T> |
Stage.thenApplyFailed(Function<? super Throwable,? extends T> fn)
Apply a failed stage.
|
<U> Stage<U> |
ConcurrentCompletable.thenCancel() |
<U> Stage<U> |
ImmediateCompleted.thenCancel() |
<U> Stage<U> |
ImmediateFailed.thenCancel() |
<U> Stage<U> |
ImmediateCancelled.thenCancel() |
<U> Stage<U> |
Stage.thenCancel()
Build a stage is cancelled, but waits until the current stage completes.
|
<U> Stage<U> |
ConcurrentCompletable.thenComplete(U result) |
<U> Stage<U> |
ImmediateCompleted.thenComplete(U result) |
<U> Stage<U> |
ImmediateFailed.thenComplete(U result) |
<U> Stage<U> |
ImmediateCancelled.thenComplete(U result) |
<U> Stage<U> |
Stage.thenComplete(U result)
Build a stage is completed, but waits until the current stage completes.
|
<R> Stage<R> |
ImmediateCompleted.thenCompose(Function<? super T,? extends Stage<R>> fn) |
<U> Stage<U> |
ConcurrentCompletable.thenCompose(Function<? super T,? extends Stage<U>> fn) |
<U> Stage<U> |
ImmediateFailed.thenCompose(Function<? super T,? extends Stage<U>> fn) |
<U> Stage<U> |
ImmediateCancelled.thenCompose(Function<? super T,? extends Stage<U>> fn) |
<U> Stage<U> |
Stage.thenCompose(Function<? super T,? extends Stage<U>> fn)
Compose the current stage with the given function.
|
Stage<T> |
ConcurrentCompletable.thenComposeCaught(Function<? super Throwable,? extends Stage<T>> fn) |
Stage<T> |
ImmediateCompleted.thenComposeCaught(Function<? super Throwable,? extends Stage<T>> fn) |
Stage<T> |
ImmediateFailed.thenComposeCaught(Function<? super Throwable,? extends Stage<T>> fn) |
Stage<T> |
ImmediateCancelled.thenComposeCaught(Function<? super Throwable,? extends Stage<T>> fn) |
Stage<T> |
Stage.thenComposeCaught(Function<? super Throwable,? extends Stage<T>> fn)
Compose a failed stage.
|
<U> Stage<U> |
ConcurrentCompletable.thenFail(Throwable cause) |
<U> Stage<U> |
ImmediateCompleted.thenFail(Throwable cause) |
<U> Stage<U> |
ImmediateFailed.thenFail(Throwable cause) |
<U> Stage<U> |
ImmediateCancelled.thenFail(Throwable cause) |
<U> Stage<U> |
Stage.thenFail(Throwable cause)
Build a stage is failed, but waits until the current stage completes.
|
Stage<T> |
ConcurrentCompletable.whenCancelled(Runnable cancelled) |
Stage<T> |
ImmediateCompleted.whenCancelled(Runnable runnable) |
Stage<T> |
ImmediateFailed.whenCancelled(Runnable runnable) |
Stage<T> |
ImmediateCancelled.whenCancelled(Runnable runnable) |
Stage<T> |
Stage.whenCancelled(Runnable runnable)
Register an listener to be called when the current stage is cancelled.
|
Stage<T> |
ConcurrentCompletable.whenComplete(Consumer<? super T> consumer) |
Stage<T> |
ImmediateCompleted.whenComplete(Consumer<? super T> consumer) |
Stage<T> |
ImmediateFailed.whenComplete(Consumer<? super T> consumer) |
Stage<T> |
ImmediateCancelled.whenComplete(Consumer<? super T> consumer) |
Stage<T> |
Stage.whenComplete(Consumer<? super T> consumer)
Register a listener to be called when the current stage is completed.
|
Stage<T> |
ConcurrentCompletable.whenDone(Runnable finishable) |
Stage<T> |
ImmediateCompleted.whenDone(Runnable runnable) |
Stage<T> |
ImmediateFailed.whenDone(Runnable runnable) |
Stage<T> |
ImmediateCancelled.whenDone(Runnable runnable) |
Stage<T> |
Stage.whenDone(Runnable runnable)
Register a listener to be called when the current stage finishes for any reason.
|
Stage<T> |
ConcurrentCompletable.whenFailed(Consumer<? super Throwable> consumer) |
Stage<T> |
ImmediateCompleted.whenFailed(Consumer<? super Throwable> consumer) |
Stage<T> |
ImmediateFailed.whenFailed(Consumer<? super Throwable> consumer) |
Stage<T> |
ImmediateCancelled.whenFailed(Consumer<? super Throwable> consumer) |
Stage<T> |
Stage.whenFailed(Consumer<? super Throwable> consumer)
Register a listener that is called when a stage is failed.
|
Stage<T> |
ConcurrentCompletable.withCloser(Supplier<? extends Stage<Void>> complete,
Supplier<? extends Stage<Void>> notComplete) |
Stage<T> |
ImmediateCompleted.withCloser(Supplier<? extends Stage<Void>> complete,
Supplier<? extends Stage<Void>> notComplete) |
Stage<T> |
ImmediateFailed.withCloser(Supplier<? extends Stage<Void>> complete,
Supplier<? extends Stage<Void>> notComplete) |
Stage<T> |
ImmediateCancelled.withCloser(Supplier<? extends Stage<Void>> complete,
Supplier<? extends Stage<Void>> notComplete) |
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> |
ConcurrentCompletable.withComplete(Supplier<? extends Stage<Void>> supplier) |
Stage<T> |
ImmediateCompleted.withComplete(Supplier<? extends Stage<Void>> supplier) |
Stage<T> |
ImmediateFailed.withComplete(Supplier<? extends Stage<Void>> supplier) |
Stage<T> |
ImmediateCancelled.withComplete(Supplier<? extends Stage<Void>> supplier) |
Stage<T> |
Stage.withComplete(Supplier<? extends Stage<Void>> supplier)
Run the provided stage when the current stage has completed.
|
Stage<T> |
ConcurrentCompletable.withNotComplete(Supplier<? extends Stage<Void>> supplier) |
Stage<T> |
ImmediateCompleted.withNotComplete(Supplier<? extends Stage<Void>> supplier) |
Stage<T> |
ImmediateFailed.withNotComplete(Supplier<? extends Stage<Void>> supplier) |
Stage<T> |
ImmediateCancelled.withNotComplete(Supplier<? extends Stage<Void>> supplier) |
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 |
---|---|
<C,T> Stage<T> |
CoreAsync.collect(Collection<? extends Stage<? extends C>> stages,
Function<? super Collection<C>,? extends T> collector) |
<T> Stage<Collection<T>> |
CoreAsync.collect(Collection<? extends Stage<? extends T>> stages) |
<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> |
CoreAsync.collectAndDiscard(Collection<? extends Stage<?>> stages) |
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.
|
protected <C,T> Stage<T> |
CoreAsync.doCollect(Collection<? extends Stage<? extends C>> stages,
Function<? super Collection<C>,? extends T> collector) |
<R> Stage<R> |
ConcurrentManaged.doto(Function<? super T,? extends Stage<R>> action) |
<U> Stage<U> |
Managed.doto(Function<? super T,? extends Stage<U>> action)
Borrow a reference and execute the given action.
|
<C,T> Stage<T> |
CoreAsync.eventuallyCollect(Collection<? extends Callable<? extends Stage<? extends C>>> callables,
Consumer<? super C> consumer,
Supplier<? extends T> supplier,
int parallelism) |
<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.
|
<C> Managed<C> |
CoreAsync.managed(Supplier<? extends Stage<C>> setup,
Function<? super C,? extends Stage<Void>> teardown) |
<C> Managed<C> |
CoreAsync.managed(Supplier<? extends Stage<C>> setup,
Function<? super C,? extends Stage<Void>> teardown) |
<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.
|
static <T> ConcurrentManaged<T> |
ConcurrentManaged.newManaged(Async async,
Caller caller,
ManagedOptions options,
Supplier<? extends Stage<T>> setup,
Function<? super T,? extends Stage<Void>> teardown) |
static <T> ConcurrentManaged<T> |
ConcurrentManaged.newManaged(Async async,
Caller caller,
ManagedOptions options,
Supplier<? extends Stage<T>> setup,
Function<? super T,? extends Stage<Void>> teardown) |
<C> ReloadableManaged<C> |
CoreAsync.reloadableManaged(Supplier<? extends Stage<C>> setup,
Function<? super C,? extends Stage<Void>> teardown) |
<C> ReloadableManaged<C> |
CoreAsync.reloadableManaged(Supplier<? extends Stage<C>> setup,
Function<? super C,? extends Stage<Void>> teardown) |
<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>> |
CoreAsync.retryUntilCompleted(Callable<? extends Stage<T>> callable,
RetryPolicy policy) |
<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>> |
CoreAsync.retryUntilCompleted(Callable<? extends Stage<T>> callable,
RetryPolicy policy,
ClockSource clockSource) |
<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> |
CoreAsync.streamCollect(Collection<? extends Stage<? extends T>> stages,
Consumer<? super T> consumer,
Supplier<? extends U> supplier) |
<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.
|
<R> Stage<R> |
ImmediateCompleted.thenCompose(Function<? super T,? extends Stage<R>> fn) |
<U> Stage<U> |
ConcurrentCompletable.thenCompose(Function<? super T,? extends Stage<U>> fn) |
<U> Stage<U> |
ImmediateFailed.thenCompose(Function<? super T,? extends Stage<U>> fn) |
<U> Stage<U> |
ImmediateCancelled.thenCompose(Function<? super T,? extends Stage<U>> fn) |
<U> Stage<U> |
Stage.thenCompose(Function<? super T,? extends Stage<U>> fn)
Compose the current stage with the given function.
|
Stage<T> |
ConcurrentCompletable.thenComposeCaught(Function<? super Throwable,? extends Stage<T>> fn) |
Stage<T> |
ImmediateCompleted.thenComposeCaught(Function<? super Throwable,? extends Stage<T>> fn) |
Stage<T> |
ImmediateFailed.thenComposeCaught(Function<? super Throwable,? extends Stage<T>> fn) |
Stage<T> |
ImmediateCancelled.thenComposeCaught(Function<? super Throwable,? extends Stage<T>> fn) |
Stage<T> |
Stage.thenComposeCaught(Function<? super Throwable,? extends Stage<T>> fn)
Compose a failed stage.
|
Stage<T> |
ConcurrentCompletable.withCloser(Supplier<? extends Stage<Void>> complete,
Supplier<? extends Stage<Void>> notComplete) |
Stage<T> |
ConcurrentCompletable.withCloser(Supplier<? extends Stage<Void>> complete,
Supplier<? extends Stage<Void>> notComplete) |
Stage<T> |
ImmediateCompleted.withCloser(Supplier<? extends Stage<Void>> complete,
Supplier<? extends Stage<Void>> notComplete) |
Stage<T> |
ImmediateCompleted.withCloser(Supplier<? extends Stage<Void>> complete,
Supplier<? extends Stage<Void>> notComplete) |
Stage<T> |
ImmediateFailed.withCloser(Supplier<? extends Stage<Void>> complete,
Supplier<? extends Stage<Void>> notComplete) |
Stage<T> |
ImmediateFailed.withCloser(Supplier<? extends Stage<Void>> complete,
Supplier<? extends Stage<Void>> notComplete) |
Stage<T> |
ImmediateCancelled.withCloser(Supplier<? extends Stage<Void>> complete,
Supplier<? extends Stage<Void>> notComplete) |
Stage<T> |
ImmediateCancelled.withCloser(Supplier<? extends Stage<Void>> complete,
Supplier<? extends Stage<Void>> notComplete) |
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> |
ConcurrentCompletable.withComplete(Supplier<? extends Stage<Void>> supplier) |
Stage<T> |
ImmediateCompleted.withComplete(Supplier<? extends Stage<Void>> supplier) |
Stage<T> |
ImmediateFailed.withComplete(Supplier<? extends Stage<Void>> supplier) |
Stage<T> |
ImmediateCancelled.withComplete(Supplier<? extends Stage<Void>> supplier) |
Stage<T> |
Stage.withComplete(Supplier<? extends Stage<Void>> supplier)
Run the provided stage when the current stage has completed.
|
Stage<T> |
ConcurrentCompletable.withNotComplete(Supplier<? extends Stage<Void>> supplier) |
Stage<T> |
ImmediateCompleted.withNotComplete(Supplier<? extends Stage<Void>> supplier) |
Stage<T> |
ImmediateFailed.withNotComplete(Supplier<? extends Stage<Void>> supplier) |
Stage<T> |
ImmediateCancelled.withNotComplete(Supplier<? extends Stage<Void>> supplier) |
Stage<T> |
Stage.withNotComplete(Supplier<? extends Stage<Void>> supplier)
Run the provided stage when the current stage ends, but does not complete.
|
Constructor and Description |
---|
DelayedCollectCoordinator(Caller caller,
Collection<? extends Callable<? extends Stage<? extends S>>> callables,
Consumer<S> consumer,
Supplier<T> supplier,
Completable<? super T> future,
int parallelism) |
RetryCallHelper(long start,
ScheduledExecutorService scheduler,
Callable<? extends Stage<? extends T>> callable,
Supplier<RetryDecision> policyInstance,
Completable<T> future,
ClockSource clockSource) |
Copyright © 2017. All rights reserved.