@Override
public void execute(ReadGraphImpl graph, int i) throws DatabaseException {
+ if(done) return;
done = true;
RelationInfo result = new RelationInfo(r, isFunctional, isFinal, true);
if(entry != null) entry.setResult(result);
@Override
public void finished(ReadGraphImpl graph) throws DatabaseException {
- if(!done) {
- done = true;
- RelationInfo result = new RelationInfo(r, isFunctional, isFinal, false);
- if(entry != null) entry.setResult(result);
- proc.execute(graph, result);
- }
+ if(done) return;
+ done = true;
+ RelationInfo result = new RelationInfo(r, isFunctional, isFinal, false);
+ if(entry != null) entry.setResult(result);
+ proc.execute(graph, result);
}
@Override
public void exception(ReadGraphImpl graph, Throwable throwable) throws DatabaseException {
- if(!done) {
- done = true;
- DatabaseException e = new DatabaseException("Internal error in RelationInfoQuery");
- if(entry != null) entry.except(e);
- proc.exception(graph, e);
- }
+ if(done) return;
+ done = true;
+ DatabaseException e = new DatabaseException("Internal error in RelationInfoQuery");
+ if(entry != null) entry.except(e);
+ proc.exception(graph, e);
}
});
}
- @Override
+ //@Override
public Object compute(ReadGraphImpl graph, final InternalProcedure<RelationInfo> procedure) throws DatabaseException {
computeForEach(graph, id, this, procedure);
return getResult();