| Package | Description |
|---|---|
| org.apache.ratis.util | |
| org.apache.ratis.util.function |
| Modifier and Type | Method and Description |
|---|---|
CheckedSupplier<PROXY,IOException> |
PeerProxyMap.computeIfAbsent(RaftPeer peer)
This method is similar to
Map.computeIfAbsent(Object, java.util.function.Function)
except that this method does not require a mapping function. |
static <OUTPUT,THROWABLE extends Throwable> |
LogUtils.newCheckedSupplier(org.slf4j.Logger log,
CheckedSupplier<OUTPUT,THROWABLE> supplier,
Supplier<String> name) |
| Modifier and Type | Method and Description |
|---|---|
static <RETURN,THROWABLE extends Throwable> |
JavaUtils.attempt(CheckedSupplier<RETURN,THROWABLE> supplier,
int numAttempts,
TimeDuration sleepTime,
Supplier<?> name,
org.slf4j.Logger log)
Attempt to get a return value from the given supplier multiple times.
|
static <T> T |
FileUtils.attempt(CheckedSupplier<T,IOException> op,
Supplier<?> name) |
static <RETURN,THROWABLE extends Throwable> |
JavaUtils.attemptRepeatedly(CheckedSupplier<RETURN,THROWABLE> supplier,
int numAttempts,
TimeDuration sleepTime,
String name,
org.slf4j.Logger log)
Attempt to get a return value from the given supplier multiple times.
|
static <OUTPUT,THROWABLE extends Throwable> |
JavaUtils.callAsUnchecked(CheckedSupplier<OUTPUT,THROWABLE> checkedSupplier,
Function<THROWABLE,? extends RuntimeException> converter) |
static <OUTPUT,THROWABLE extends Throwable> |
LogUtils.newCheckedSupplier(org.slf4j.Logger log,
CheckedSupplier<OUTPUT,THROWABLE> supplier,
Supplier<String> name) |
<OUTPUT,THROWABLE extends Throwable> |
TaskQueue.submit(CheckedSupplier<OUTPUT,THROWABLE> task,
ExecutorService executor)
The same as submit(task, executor, Function.identity());
|
<OUTPUT,THROWABLE extends Throwable> |
TaskQueue.submit(CheckedSupplier<OUTPUT,THROWABLE> task,
ExecutorService executor,
Function<Throwable,Throwable> newThrowable)
Offer the given task to this queue
and then submit the tasks one by one in the queue order for execution.
|
static <OUTPUT,THROWABLE extends Throwable> |
LogUtils.supplyAndLog(org.slf4j.Logger log,
CheckedSupplier<OUTPUT,THROWABLE> supplier,
Supplier<String> name) |
static <OUTPUT,THROWABLE extends Throwable> |
JavaUtils.supplyAndWrapAsCompletionException(CheckedSupplier<OUTPUT,THROWABLE> supplier) |
| Modifier and Type | Method and Description |
|---|---|
static <THROWABLE extends Throwable> |
CheckedRunnable.asCheckedSupplier(CheckedRunnable<THROWABLE> runnable) |
Copyright © 2017–2022 The Apache Software Foundation. All rights reserved.