| Package | Description |
|---|---|
| org.apache.bookkeeper.common.concurrent |
Utility classes commonly useful in concurrent programming.
|
| org.apache.bookkeeper.common.util |
Util functions used across the project.
|
| Modifier and Type | Method and Description |
|---|---|
static <T> java.util.concurrent.CompletableFuture<T> |
FutureUtils.whenCompleteAsync(java.util.concurrent.CompletableFuture<T> future,
java.util.function.BiConsumer<? super T,? super java.lang.Throwable> action,
OrderedScheduler scheduler,
java.lang.Object scheduleKey)
Completing the
future in the thread in the scheduler identified by
the scheduleKey. |
static <T> java.util.concurrent.CompletableFuture<T> |
FutureUtils.within(java.util.concurrent.CompletableFuture<T> promise,
long timeout,
java.util.concurrent.TimeUnit unit,
java.lang.Throwable cause,
OrderedScheduler scheduler,
java.lang.Object key)
Raise an exception to the promise within a given timeout period.
|
| Modifier and Type | Method and Description |
|---|---|
OrderedScheduler |
OrderedScheduler.SchedulerBuilder.build() |
| Modifier and Type | Method and Description |
|---|---|
static <ReturnT> java.util.concurrent.CompletableFuture<ReturnT> |
Retries.run(java.util.stream.Stream<java.lang.Long> backoffs,
java.util.function.Predicate<java.lang.Throwable> retryPredicate,
java.util.function.Supplier<java.util.concurrent.CompletableFuture<ReturnT>> task,
OrderedScheduler scheduler)
Retry a given
task on failures. |
static <ReturnT> java.util.concurrent.CompletableFuture<ReturnT> |
Retries.run(java.util.stream.Stream<java.lang.Long> backoffs,
java.util.function.Predicate<java.lang.Throwable> retryPredicate,
java.util.function.Supplier<java.util.concurrent.CompletableFuture<ReturnT>> task,
OrderedScheduler scheduler,
java.lang.Object key)
Retry a given
task on failures. |
Copyright © 2011–2022 The Apache Software Foundation. All rights reserved.