Class UncheckedFutureImpl<V>
- java.lang.Object
-
- org.apache.commons.lang3.concurrent.AbstractFutureProxy<V>
-
- org.apache.commons.lang3.concurrent.UncheckedFutureImpl<V>
-
- Type Parameters:
V- The result type returned by this UncheckedFuture'sget()andget(long, TimeUnit)methods.
- All Implemented Interfaces:
java.util.concurrent.Future<V>,UncheckedFuture<V>
final class UncheckedFutureImpl<V> extends AbstractFutureProxy<V> implements UncheckedFuture<V>
AnFutureimplementation that throws unchecked instead of checked exceptions.- Since:
- 3.13.0
- See Also:
Future
-
-
Constructor Summary
Constructors Constructor Description UncheckedFutureImpl(java.util.concurrent.Future<V> future)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Vget()Gets perFuture.get()but rethrows checked exceptions as unchecked.Vget(long timeout, java.util.concurrent.TimeUnit unit)Gets perFuture.get(long, TimeUnit)but rethrows checked exceptions as unchecked.-
Methods inherited from class org.apache.commons.lang3.concurrent.AbstractFutureProxy
cancel, getFuture, isCancelled, isDone
-
-
-
-
Constructor Detail
-
UncheckedFutureImpl
UncheckedFutureImpl(java.util.concurrent.Future<V> future)
-
-
Method Detail
-
get
public V get()
Description copied from interface:UncheckedFutureGets perFuture.get()but rethrows checked exceptions as unchecked.The default mapping from checked to unchecked is:
InterruptedException→UncheckedInterruptedExceptionExecutionException→UncheckedExecutionException
- Specified by:
getin interfacejava.util.concurrent.Future<V>- Specified by:
getin interfaceUncheckedFuture<V>- Overrides:
getin classAbstractFutureProxy<V>
-
get
public V get(long timeout, java.util.concurrent.TimeUnit unit)
Description copied from interface:UncheckedFutureGets perFuture.get(long, TimeUnit)but rethrows checked exceptions as unchecked.The default mapping from checked to unchecked is:
InterruptedException→UncheckedInterruptedExceptionExecutionException→UncheckedExecutionExceptionTimeoutException→UncheckedTimeoutException
- Specified by:
getin interfacejava.util.concurrent.Future<V>- Specified by:
getin interfaceUncheckedFuture<V>- Overrides:
getin classAbstractFutureProxy<V>
-
-