示例#1
0
 public Lock getVariableLock(
     Variable.Finder[] finders, TransactionLockTypes.LockType[] lockTypes) {
   assert finders.length == lockTypes.length;
   VariablesLock lock = new VariablesLock();
   for (int i = 0; i < finders.length; i++) {
     lock.addVariable(finders[i], lockTypes[i]);
   }
   return lock;
 }
示例#2
0
 public Lock getVariableLock(Variable.Finder finder, TransactionLockTypes.LockType lockType) {
   VariablesLock lock = new VariablesLock();
   lock.addVariable(finder, lockType);
   return lock;
 }