use of org.apache.jena.sparql.core.DatasetGraph in project jena by apache.
the class AbstractDatasetGraphFind method create.
/**
* Create the dataset to test loaded with the supplied data - this dataset need not be mutable.
* Either supply {@link #create()} or override this method.
*/
protected DatasetGraph create(Collection<Quad> data) {
DatasetGraph dsg = create();
add(dsg, data);
return dsg;
}
use of org.apache.jena.sparql.core.DatasetGraph in project jena by apache.
the class AbstractTestTransPromote method run_07.
// Async writer after promotion.
private void run_07(boolean readCommitted) {
Assume.assumeTrue(!readCommitted || supportsReadCommitted());
setReadCommitted(readCommitted);
DatasetGraph dsg = create();
// Start long running reader.
ThreadAction tt = ThreadTxn.threadTxnRead(dsg, () -> {
long x = Iter.count(dsg.find());
if (x != 0)
throw new RuntimeException();
});
// Start R->W here
dsg.begin(ReadWrite.READ);
dsg.add(q1);
dsg.add(q2);
dsg.commit();
dsg.end();
tt.run();
}
use of org.apache.jena.sparql.core.DatasetGraph in project jena by apache.
the class AbstractTestTransPromote method run_04.
private void run_04(boolean readCommitted) {
Assume.assumeTrue(!readCommitted || supportsReadCommitted());
setReadCommitted(readCommitted);
DatasetGraph dsg = create();
dsg.begin(ReadWrite.WRITE);
dsg.abort();
dsg.end();
dsg.begin(ReadWrite.READ);
dsg.add(q1);
dsg.commit();
dsg.end();
}
use of org.apache.jena.sparql.core.DatasetGraph in project jena by apache.
the class AbstractTestTransPromote method run_02.
// Previous transaction then READ-add
private void run_02(boolean readCommitted) {
Assume.assumeTrue(!readCommitted || supportsReadCommitted());
setReadCommitted(readCommitted);
DatasetGraph dsg = create();
dsg.begin(ReadWrite.READ);
dsg.end();
dsg.begin(ReadWrite.READ);
dsg.add(q1);
dsg.commit();
dsg.end();
}
use of org.apache.jena.sparql.core.DatasetGraph in project jena by apache.
the class AbstractTestTransPromote method run_03.
private void run_03(boolean readCommitted) {
Assume.assumeTrue(!readCommitted || supportsReadCommitted());
setReadCommitted(readCommitted);
DatasetGraph dsg = create();
dsg.begin(ReadWrite.WRITE);
dsg.commit();
dsg.end();
dsg.begin(ReadWrite.READ);
dsg.add(q1);
dsg.commit();
dsg.end();
}
Aggregations