helpful progress reporting
[IRC.git] / Robust / Transactions / src / file / interfaces / CustomCM.java
1 /*
2  * To change this template, choose Tools | Templates
3  * and open the template in the editor.
4  */
5
6 package dstm2.file.interfaces;
7
8 import dstm2.Transaction.Status;
9 import java.util.Collection;
10 import dstm2.file.factory.TransactionalFile;
11
12 /**
13  *
14  * @author navid
15  */
16 public class CustomCM implements ContentionManager{
17
18     public void resolveConflict(Transaction me, Transaction other, TransactionalFile obj) {
19         if (other != null)
20             if (other.getStatus() == Status.ACTIVE || other.getStatus() == Status.COMMITTED)
21                 other.waitWhileActiveNotWaiting();
22     }
23
24     public void resolveConflict(Transaction me, Collection<Transaction> other) {
25         throw new UnsupportedOperationException("Not supported yet.");
26     }
27
28     public long getPriority() {
29         throw new UnsupportedOperationException("Not supported yet.");
30     }
31
32     public void setPriority(long value) {
33         throw new UnsupportedOperationException("Not supported yet.");
34     }
35
36     public void openSucceeded() {
37         throw new UnsupportedOperationException("Not supported yet.");
38     }
39
40     public void committed() {
41         throw new UnsupportedOperationException("Not supported yet.");
42     }
43
44     public void resolveConflict(Transaction me, Transaction other) {
45         throw new UnsupportedOperationException("Not supported yet.");
46     }
47
48 }