Replace transaction.setComplete() by database.commitTransaction()

This commit is contained in:
Torsten Grote
2016-10-31 08:47:11 -02:00
parent 36f087c512
commit b34b4623ed
39 changed files with 259 additions and 241 deletions

View File

@@ -314,7 +314,7 @@ public class ContactExchangeTaskImpl extends Thread
localAuthor.getId(), master, timestamp, alice, true, true);
transportPropertyManager.addRemoteProperties(txn, contactId,
remoteProperties);
txn.setComplete();
db.commitTransaction(txn);
} finally {
db.endTransaction(txn);
}

View File

@@ -65,7 +65,7 @@ class ContactManagerImpl implements ContactManager {
try {
c = addContact(txn, remote, local, master, timestamp, alice,
verified, active);
txn.setComplete();
db.commitTransaction(txn);
} finally {
db.endTransaction(txn);
}
@@ -78,7 +78,7 @@ class ContactManagerImpl implements ContactManager {
Transaction txn = db.startTransaction(true);
try {
contact = db.getContact(txn, c);
txn.setComplete();
db.commitTransaction(txn);
} finally {
db.endTransaction(txn);
}
@@ -91,7 +91,7 @@ class ContactManagerImpl implements ContactManager {
Transaction txn = db.startTransaction(true);
try {
contacts = db.getContacts(txn);
txn.setComplete();
db.commitTransaction(txn);
} finally {
db.endTransaction(txn);
}
@@ -105,7 +105,7 @@ class ContactManagerImpl implements ContactManager {
Transaction txn = db.startTransaction(false);
try {
removeContact(txn, c);
txn.setComplete();
db.commitTransaction(txn);
} finally {
db.endTransaction(txn);
}
@@ -130,7 +130,7 @@ class ContactManagerImpl implements ContactManager {
Transaction txn = db.startTransaction(true);
try {
exists = contactExists(txn, remoteAuthorId, localAuthorId);
txn.setComplete();
db.commitTransaction(txn);
} finally {
db.endTransaction(txn);
}