| 程序包 | 说明 |
|---|---|
| org.apache.ratis.util | |
| org.apache.ratis.util.function |
| 限定符和类型 | 类和说明 |
|---|---|
class |
MemoizedCheckedSupplier<RETURN,THROW extends Throwable>
A memoized supplier is a
CheckedSupplier
which gets a value by invoking its initializer once. |
| 限定符和类型 | 方法和说明 |
|---|---|
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) |
| 限定符和类型 | 方法和说明 |
|---|---|
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) |
static <RETURN,THROW extends Throwable> |
MemoizedCheckedSupplier.valueOf(CheckedSupplier<RETURN,THROW> supplier) |
| 限定符和类型 | 方法和说明 |
|---|---|
static <THROWABLE extends Throwable> |
CheckedRunnable.asCheckedSupplier(CheckedRunnable<THROWABLE> runnable) |
Copyright © 2017–2023 The Apache Software Foundation. All rights reserved.