I answered your question on S/O: http://stackoverflow.com/a/11902993/656408
tltr; It's less straightforward in Java than it is in Python, you should feel a feature request on the public issue tracker to improve the API. http://code.google.com/p/googleappengine/issues/entry?template=Feature%20request Hope that helps. On Fri, Aug 10, 2012 at 5:18 AM, Emanuele Ziglioli < [email protected]> wrote: > I'm doing some experiments > on com.google.appengine.api.memcache.MemcacheServiceImpl > > private static <T> T quietGet(Future<T> future) { > try { > // return future.get(); > return future.get( 100, TimeUnit.MILLISECONDS); > } catch (TimeoutException ex) { > // throw new ExecutionException(createDeadlineException()); > logger.log(Level.WARNING, ex.getMessage() + " " + future ); > return null; > } > catch (InterruptedException e) { > Thread.currentThread().interrupt(); > throw new MemcacheServiceException("Unexpected failure", e); > } catch (ExecutionException e) { > Throwable cause = e.getCause(); > if (cause instanceof RuntimeException) { > throw (RuntimeException) cause; > } else if (cause instanceof Error) { > throw (Error) cause; > } else { > throw new UndeclaredThrowableException(cause); > } > } > } > > > > I'm not sure if it's working 100% yet, the web app seems to open faster, > but there are still errors. > I'm sure something can be improved around there.... > I'm off next week, have fun > > > > > -- > You received this message because you are subscribed to the Google Groups > "Google App Engine" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/google-appengine/-/aKrs3-BElJwJ. > > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/google-appengine?hl=en. > -- Johan Euphrosine (proppy) Developer Programs Engineer Google Developer Relations -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
