@@ -97,7+97,7 @@ final public class Statements extends CollectionBinaryQuery<TripleIntProcedure>
@Override
public void execute(ReadGraphImpl graph, int type) throws DatabaseException {
if(result == null) {
@Override
public void execute(ReadGraphImpl graph, int type) throws DatabaseException {
if(result == null) {
- result = QueryCache.resultAssertedStatements(graph, type, r2, entry, null, NOPT);
+ result = QueryCache.resultAssertedStatements(graph, type, r2, entry, null);
} else {
if (first) {
IntArray ia = result;
} else {
if (first) {
IntArray ia = result;
@@ -107,7+107,7 @@ final public class Statements extends CollectionBinaryQuery<TripleIntProcedure>
}
first = false;
}
}
first = false;
}
- IntArray ia = QueryCache.resultAssertedStatements(graph, type, r2, entry, null, NOPT);
+ IntArray ia = QueryCache.resultAssertedStatements(graph, type, r2, entry, null);
if(ia.data != null) {
for(int i = 0;i < ia.sizeOrData ; i+=3) addStatement(ia.data[i],ia.data[i+1],ia.data[i+2]);
}
if(ia.data != null) {
for(int i = 0;i < ia.sizeOrData ; i+=3) addStatement(ia.data[i],ia.data[i+1],ia.data[i+2]);
}
@@ -135,6+135,10 @@ final public class Statements extends CollectionBinaryQuery<TripleIntProcedure>
final static private void forSingleAssertion(ReadGraphImpl graph, final int r1, final int r2, final Statements entry, final TripleIntProcedure procedure) throws DatabaseException {
final static private void forSingleAssertion(ReadGraphImpl graph, final int r1, final int r2, final Statements entry, final TripleIntProcedure procedure) throws DatabaseException {
public static void computeForEach(ReadGraphImpl graph, final int r1, final int r2, final Statements entry, final TripleIntProcedure procedure) throws DatabaseException {
public static void computeForEach(ReadGraphImpl graph, final int r1, final int r2, final Statements entry, final TripleIntProcedure procedure) throws DatabaseException {
+ if(entry != null) {
+ assert(entry.isPending());
+ }
+
QueryCache.runnerRelationInfoQuery(graph, r2, entry, null, new InternalProcedure<RelationInfo>() {
@Override
QueryCache.runnerRelationInfoQuery(graph, r2, entry, null, new InternalProcedure<RelationInfo>() {
@Override
@@ -690,6+692,7 @@ final public class Statements extends CollectionBinaryQuery<TripleIntProcedure>
synchronized(this) {
setReady();
synchronized(this) {
setReady();
+ //new Exception(toString() + " is READY").printStackTrace();
}
IntArray v = (IntArray)getResult();
}
IntArray v = (IntArray)getResult();
@@ -761,7+764,7 @@ final public class Statements extends CollectionBinaryQuery<TripleIntProcedure>
@Override
public void recompute(ReadGraphImpl graph) throws DatabaseException {
@Override
public void recompute(ReadGraphImpl graph) throws DatabaseException {
- compute(graph, new TripleIntProcedureAdapter() {
+ computeForEach(graph, r1(), r2(), this, new TripleIntProcedureAdapter() {