+ protected abstract class AsyncReadQuery<Result> implements AsyncRead<Result> {
+ protected Result result = null;
+
+ public abstract void run(AsyncReadGraph graph) throws Throwable;
+
+ @Override
+ public void perform(AsyncReadGraph graph, AsyncProcedure<Result> procedure) {
+ try {
+ run(graph);
+ } catch(Throwable t) {
+ if (DEBUG) {
+ new Exception().printStackTrace();
+ t.printStackTrace();
+ }
+ if (null == exception2)
+ exception2 = t;
+ }
+ }
+
+ }
+