com.googlecode.objectify.util
Class FutureHelper

java.lang.Object
  extended by com.googlecode.objectify.util.FutureHelper

public class FutureHelper
extends java.lang.Object

This provides some of the methods of Google's (package-private) FutureHelper

Author:
Jeff Schnitzer
See Also:
FutureHelper

Constructor Summary
FutureHelper()
           
 
Method Summary
static
<T> T
quietGet(java.util.concurrent.Future<T> future)
          Quietly perform the get() on a future
static void unwrapAndThrow(java.lang.Throwable ex)
          Properly unwraps ExecutionException, throwing the relevant original cause.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FutureHelper

public FutureHelper()
Method Detail

quietGet

public static <T> T quietGet(java.util.concurrent.Future<T> future)
Quietly perform the get() on a future


unwrapAndThrow

public static void unwrapAndThrow(java.lang.Throwable ex)
Properly unwraps ExecutionException, throwing the relevant original cause. Otherwise RuntimeExceptions get thrown and checked exceptions get wrapped in a RuntimeException.



Copyright © 2011 Jeff Schnitzer and a gang of pirates. All Rights Reserved. Build version: 3.1