Package | Description |
---|---|
org.apache.camel.util.concurrent |
Concurrent utility classes
|
org.apache.camel.util.function |
Function utility classes
|
Modifier and Type | Method and Description |
---|---|
static <R,T extends Throwable> |
LockHelper.supplyWithReadLockT(StampedLock lock,
ThrowingSupplier<R,T> task) |
static <R,T extends Throwable> |
LockHelper.supplyWithWriteLockT(StampedLock lock,
ThrowingSupplier<R,T> task) |
Modifier and Type | Method and Description |
---|---|
static <T> Optional<T> |
Suppliers.firstMatching(Predicate<T> predicate,
ThrowingSupplier<T,Exception>... suppliers)
Returns the first value provide by the given suppliers that matches the given predicate.
|
static <T> Optional<T> |
Suppliers.firstNotNull(ThrowingSupplier<T,Exception>... suppliers)
Returns the first non null value provide by the given suppliers.
|
static <T> Supplier<T> |
Suppliers.memorize(ThrowingSupplier<T,? extends Exception> supplier,
Consumer<Exception> consumer)
Returns a supplier which caches the result of the first call to
Supplier.get() and returns that value on
subsequent calls. |
static <V,T extends Throwable> |
ThrowingHelper.wrapAsSupplier(ThrowingSupplier<V,T> supplier)
Wrap a
ThrowingSupplier to a standard Suppliers by throwing a RuntimeException in case of
an exception is thrown by the delegated supplier. |
Apache Camel