Netflix/astyanax — Issue #22: Add Transaction interface to MutationBatch
Author: elandau
Created: 2012-03-03 08:39:35+00:00
State: open

Add a hook for using a transaction manager when doing a MutationBatch. This will serve two use cases
1. Multi-row transaction locking (via ZooKeeper, for example)
2. Write to write ahead log used to replay failed mutations

The usage will be

MutationBatch m = new MutationBatch()
m.withRow("abc')
.putColumn(...)
...

m.usingTransactionManager(someTransactionManager);
m.execute();

The interface of the TransactionManager would be,

interface TransactionManager {
Transaction beginTransaction(MutationBatch m);
}

interface Transaction {
void commit();
void rollback();
}