-
- return getResult();
-
- }
-
- //@Override
- public Object compute(ReadGraphImpl graph, AsyncProcedure<T> procedure) throws DatabaseException {
-
- ReadGraphImpl queryGraph = graph.withParent(this);
-
- request.perform(queryGraph, new AsyncProcedure<T>() {
-
- @Override
- public void execute(AsyncReadGraph returnGraph, T result) {
- ReadGraphImpl impl = (ReadGraphImpl)returnGraph;
- AsyncReadEntry.this.addOrSet(graph, result);
- try {
- procedure.execute(graph, result);
- } catch (Throwable t) {
- t.printStackTrace();
- }
- // parentBarrier.dec(query);
- }
-
- @Override
- public void exception(AsyncReadGraph returnGraph, Throwable t) {
- ReadGraphImpl impl = (ReadGraphImpl)returnGraph;
- // AsyncReadGraph resumeGraph = finalParentGraph.newAsync();
- AsyncReadEntry.this.except(graph, t);
- try {
- procedure.exception(graph, t);
- } catch (Throwable t2) {
- t2.printStackTrace();
- }
- // parentBarrier.dec(query);
- }
-
- @Override
- public String toString() {
- return procedure.toString();
- }
-
- });
-
- return getResult();
-
+
+ if (entry != null)
+ entry.performFromCache(parentGraph, procedure_);
+
+ }
+
+ @Override
+ public String toString() {
+ if (isDiscarded())
+ return "DISCARDED " + request.toString();
+ else if (isExcepted())
+ return request.toString() + " " + getResult();
+ else
+ return request.toString() + " " + statusOrException;