V - The result type returned by this Future's get() and get(long, TimeUnit) methods.public interface UncheckedFuture<V>
extends java.util.concurrent.Future<V>
Future that throws unchecked instead checked exceptions.Future,
Exception| Modifier and Type | Method and Description |
|---|---|
V |
get()
Gets per
Future.get() but rethrows checked exceptions as unchecked. |
V |
get(long timeout,
java.util.concurrent.TimeUnit unit)
Gets per
Future.get(long, TimeUnit) but rethrows checked exceptions as unchecked. |
static <T> java.util.stream.Stream<UncheckedFuture<T>> |
map(java.util.Collection<java.util.concurrent.Future<T>> futures)
Maps the given instances as unchecked.
|
static <T> java.util.Collection<UncheckedFuture<T>> |
on(java.util.Collection<java.util.concurrent.Future<T>> futures)
Maps the given instances as unchecked.
|
static <T> UncheckedFuture<T> |
on(java.util.concurrent.Future<T> future)
Creates a new instance on the given Future.
|
static <T> java.util.stream.Stream<UncheckedFuture<T>> map(java.util.Collection<java.util.concurrent.Future<T>> futures)
T - The result type returned by the Futures' get() and get(long, TimeUnit) methods.futures - The Futures to uncheck.static <T> java.util.Collection<UncheckedFuture<T>> on(java.util.Collection<java.util.concurrent.Future<T>> futures)
T - The result type returned by the Futures' get() and get(long, TimeUnit) methods.futures - The Futures to uncheck.static <T> UncheckedFuture<T> on(java.util.concurrent.Future<T> future)
T - The result type returned by this Future's get() and get(long, TimeUnit) methods.future - The Future to uncheck.V get()
Future.get() but rethrows checked exceptions as unchecked.
The default mapping from checked to unchecked is:
InterruptedException → UncheckedInterruptedExceptionExecutionException → UncheckedExecutionExceptionget in interface java.util.concurrent.Future<V>V get(long timeout, java.util.concurrent.TimeUnit unit)
Future.get(long, TimeUnit) but rethrows checked exceptions as unchecked.
The default mapping from checked to unchecked is:
InterruptedException → UncheckedInterruptedExceptionExecutionException → UncheckedExecutionExceptionTimeoutException → UncheckedTimeoutExceptionget in interface java.util.concurrent.Future<V>Copyright © 2010 - 2023 Adobe. All Rights Reserved