use of com.yahoo.elide.core.exceptions.TransactionException in project elide by yahoo.
the class MultiplexWriteTransaction method commit.
@Override
public void commit(RequestScope scope) {
// flush all before commits
flush(scope);
ArrayList<DataStore> commitList = new ArrayList<>();
for (Entry<DataStore, DataStoreTransaction> entry : transactions.entrySet()) {
try {
entry.getValue().commit(scope);
commitList.add(entry.getKey());
} catch (HttpStatusException | WebApplicationException e) {
reverseTransactions(commitList, e, scope);
throw e;
} catch (Error | RuntimeException e) {
TransactionException transactionException = new TransactionException(e);
reverseTransactions(commitList, transactionException, scope);
throw transactionException;
}
}
}
Aggregations