Пример #1
0
 public boolean conflict(int other, ConflictType type, int hash, long lock) {
   if (cm != null) {
     Context tx = threads.get(other);
     if (cm.arbitrate(this, tx, type) == ContentionManager.KILL_OTHER) {
       // We win
       synchronized (tx.writeSet) {
         // Mutual exclusion on write set to drop locks
         if (lock == LockTable.readLock(hash)) {
           // The other transaction still owns the lock
           kill(tx);
         }
       }
       return true;
     }
   }
   return false;
 }