+ //@Override
+ public Object compute(ReadGraphImpl graph, AsyncProcedure<T> procedure) throws DatabaseException {
+
+ ReadGraphImpl queryGraph = graph.withParent(this);
+
+ try {
+
+ addOrSet(queryGraph, request.perform(queryGraph));
+ return get(queryGraph, procedure);
+
+ } catch (DatabaseException e) {
+
+ except(e);
+ return get(graph, procedure);
+
+ } catch (Throwable t) {
+
+ except(new DatabaseException(t));
+ return get(graph, procedure);
+
+ }
+
+ }
+
+ public static <T> void computeForEach(ReadGraphImpl graph, Read<T> request, ReadEntry<T> entry, AsyncProcedure<T> procedure) throws DatabaseException {
+
+ ReadGraphImpl queryGraph = entry != null ? graph.withParent(entry) : graph;
+
+ try {
+
+ T result = request.perform(queryGraph);
+ if(entry != null) entry.addOrSet(queryGraph, result);
+ procedure.execute(graph, result);
+
+ } catch (DatabaseException e) {
+
+ if(entry != null) entry.except(e);
+ procedure.exception(graph, e);
+
+ } catch (Throwable t) {
+
+ DatabaseException dbe = new DatabaseException(t);
+ if(entry != null) entry.except(dbe);
+ procedure.exception(graph, dbe);
+
+ }
+
+ }
+
+ public Object performFromCache(ReadGraphImpl graph, AsyncProcedure<T> procedure) {