use of org.apache.jena.dboe.transaction.txn.TxnId in project jena by apache.
the class TestTxnId method txnId_3.
@Test
public void txnId_3() {
TxnId id1 = TxnIdFactory.createSimple();
TxnId id2 = TxnIdSimple.create(id1.bytes());
assertNotSame(id1, id2);
assertEquals(id1, id2);
assertEquals(id1.name(), id2.name());
}
use of org.apache.jena.dboe.transaction.txn.TxnId in project jena by apache.
the class TestTxnId method txnId_1.
@Test
public void txnId_1() {
TxnId id1 = TxnIdFactory.createSimple();
assertNotNull(id1);
}
use of org.apache.jena.dboe.transaction.txn.TxnId in project jena by apache.
the class TestTxnId method txnId_2.
@Test
public void txnId_2() {
TxnId id1 = TxnIdFactory.createSimple();
TxnId id2 = TxnIdFactory.createSimple();
assertNotSame(id1, id2);
assertNotEquals(id1, id2);
}
use of org.apache.jena.dboe.transaction.txn.TxnId in project jena by apache.
the class DatasetGraphStorage method isolate.
private <T> Iterator<T> isolate(Iterator<T> iterator) {
if (txn.isInTransaction() && txn instanceof TransactionalSystem) {
// Needs TxnId to track.
TransactionalSystem txnSystem = (TransactionalSystem) txn;
TxnId txnId = txnSystem.getThreadTransaction().getTxnId();
// Add transaction protection.
return new IteratorTxnTracker<>(iterator, txnSystem, txnId);
}
return Iter.iterator(iterator);
}
Aggregations