Class FutureUtils
java.lang.Object
org.elasticsearch.common.util.concurrent.FutureUtils
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
Cancel execution of this future without interrupting a running thread.static <T> T
CallsFuture.get()
without the checked exceptions.static <T> T
CallsFuture.get(long, TimeUnit)
without the checked exceptions.static RuntimeException
-
Constructor Details
-
FutureUtils
public FutureUtils()
-
-
Method Details
-
cancel
Cancel execution of this future without interrupting a running thread. SeeFuture.cancel(boolean)
for details.- Parameters:
toCancel
- the future to cancel- Returns:
- false if the future could not be cancelled, otherwise true
-
get
CallsFuture.get()
without the checked exceptions.- Type Parameters:
T
- the type returned- Parameters:
future
- to dereference- Returns:
- the value of the future
-
get
CallsFuture.get(long, TimeUnit)
without the checked exceptions.- Type Parameters:
T
- the type returned- Parameters:
future
- to dereferencetimeout
- to waitunit
- for timeout- Returns:
- the value of the future
-
rethrowExecutionException
-