Package com.googlecode.objectify.util
Class FutureHelper
- java.lang.Object
-
- com.googlecode.objectify.util.FutureHelper
-
public class FutureHelper extends Object
This provides some of the methods of Google's (package-private) FutureHelper- Author:
- Jeff Schnitzer
- See Also:
com.google.cloud.datastore.FutureHelper
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> T
quietGet(Future<T> future)
Quietly perform the get() on a futurestatic void
unwrapAndThrow(Throwable ex)
Properly unwraps ExecutionException, throwing the relevant original cause.
-
-
-
Method Detail
-
quietGet
public static <T> T quietGet(Future<T> future)
Quietly perform the get() on a future
-
unwrapAndThrow
public static void unwrapAndThrow(Throwable ex)
Properly unwraps ExecutionException, throwing the relevant original cause. Otherwise RuntimeExceptions get thrown and checked exceptions get wrapped in a RuntimeException.
-
-