KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tc > object > gtx > TestClientGlobalTransactionManager


1 /*
2  * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
3  */

4 package com.tc.object.gtx;
5
6 import com.tc.exception.ImplementMe;
7 import com.tc.net.protocol.tcm.ChannelID;
8 import com.tc.object.lockmanager.api.LockFlushCallback;
9 import com.tc.object.lockmanager.api.LockID;
10 import com.tc.object.tx.TransactionID;
11 import com.tc.util.concurrent.NoExceptionLinkedQueue;
12
13 import java.util.Collection JavaDoc;
14 import java.util.Collections JavaDoc;
15
16 public class TestClientGlobalTransactionManager implements ClientGlobalTransactionManager {
17
18   public final NoExceptionLinkedQueue pauseCalls = new NoExceptionLinkedQueue();
19   public final NoExceptionLinkedQueue startingCalls = new NoExceptionLinkedQueue();
20   public final NoExceptionLinkedQueue unpauseCalls = new NoExceptionLinkedQueue();
21   public final NoExceptionLinkedQueue resendOutstandingCalls = new NoExceptionLinkedQueue();
22   public final NoExceptionLinkedQueue flushCalls = new NoExceptionLinkedQueue();
23   public final NoExceptionLinkedQueue getTransactionSequenceIDsCalls = new NoExceptionLinkedQueue();
24   public final NoExceptionLinkedQueue getTransactionIDsCalls = new NoExceptionLinkedQueue();
25   public Collection JavaDoc transactionSequenceIDs;
26
27   public void setLowWatermark(GlobalTransactionID lowWatermark) {
28     throw new ImplementMe();
29   }
30
31   public void flush(LockID lockID) {
32     flushCalls.put(lockID);
33   }
34
35   public GlobalTransactionID getLowGlobalTransactionIDWatermark() {
36     throw new ImplementMe();
37   }
38
39   public void unpause() {
40     unpauseCalls.put(new Object JavaDoc());
41   }
42
43   public void starting() {
44     startingCalls.put(new Object JavaDoc());
45   }
46
47   public void pause() {
48     pauseCalls.put(new Object JavaDoc());
49   }
50
51   public void resendOutstanding() {
52     resendOutstandingCalls.put(new Object JavaDoc());
53   }
54
55   public Collection JavaDoc getTransactionSequenceIDs() {
56     this.getTransactionSequenceIDsCalls.put(new Object JavaDoc());
57     return transactionSequenceIDs;
58   }
59
60   public boolean startApply(ChannelID committerID, TransactionID transactionID, GlobalTransactionID globalTransactionID) {
61     throw new ImplementMe();
62   }
63
64   public int size() {
65     throw new ImplementMe();
66   }
67
68   public Collection JavaDoc getResentTransactionIDs() {
69     this.getTransactionIDsCalls.put(new Object JavaDoc());
70     return Collections.EMPTY_LIST;
71   }
72
73   public void resendOutstandingAndUnpause() {
74     resendOutstanding();
75     unpause();
76   }
77
78   public boolean isTransactionsForLockFlushed(LockID lockID, LockFlushCallback callback) {
79     throw new ImplementMe();
80   }
81
82 }
83
Popular Tags