public interface CassandraLockManager
CassandraLockManager is the interface between the DAO and the lock manager.
The DAO uses the executeCriticalSection(com.h3c.util.Procedure<T>) to execute
a transaction based query.
The implementation of the method encapsulates the begin and end of a given
transaction.| Modifier and Type | Method and Description |
|---|---|
<T> T |
executeCriticalSection(Procedure<T> procedure)
This method executes the Critical section.
|
<T> T executeCriticalSection(Procedure<T> procedure) throws Exception
executeCriticalSection(Procedure procedure) {
// Begin the transaction
begin();
// Try critical section
try {
return procedure.execute();
} finally {
// End Transaction
end();
}
}
Copyright © 2014. All Rights Reserved.