Class 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 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.