01: /*
02: * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright
03: * notice. All rights reserved.
04: */
05: package com.tc.object.gtx;
06:
07: import com.tc.exception.ImplementMe;
08: import com.tc.net.groups.NodeID;
09: import com.tc.object.lockmanager.api.LockFlushCallback;
10: import com.tc.object.lockmanager.api.LockID;
11: import com.tc.object.tx.TransactionID;
12: import com.tc.util.concurrent.NoExceptionLinkedQueue;
13:
14: import java.util.Collection;
15: import java.util.Collections;
16:
17: public class TestClientGlobalTransactionManager implements
18: ClientGlobalTransactionManager {
19:
20: public final NoExceptionLinkedQueue pauseCalls = new NoExceptionLinkedQueue();
21: public final NoExceptionLinkedQueue startingCalls = new NoExceptionLinkedQueue();
22: public final NoExceptionLinkedQueue unpauseCalls = new NoExceptionLinkedQueue();
23: public final NoExceptionLinkedQueue resendOutstandingCalls = new NoExceptionLinkedQueue();
24: public final NoExceptionLinkedQueue flushCalls = new NoExceptionLinkedQueue();
25: public final NoExceptionLinkedQueue getTransactionSequenceIDsCalls = new NoExceptionLinkedQueue();
26: public final NoExceptionLinkedQueue getTransactionIDsCalls = new NoExceptionLinkedQueue();
27: public Collection transactionSequenceIDs;
28:
29: public void setLowWatermark(GlobalTransactionID lowWatermark) {
30: throw new ImplementMe();
31: }
32:
33: public void flush(LockID lockID) {
34: flushCalls.put(lockID);
35: }
36:
37: public GlobalTransactionID getLowGlobalTransactionIDWatermark() {
38: throw new ImplementMe();
39: }
40:
41: public void unpause() {
42: unpauseCalls.put(new Object());
43: }
44:
45: public void starting() {
46: startingCalls.put(new Object());
47: }
48:
49: public void pause() {
50: pauseCalls.put(new Object());
51: }
52:
53: public void resendOutstanding() {
54: resendOutstandingCalls.put(new Object());
55: }
56:
57: public Collection getTransactionSequenceIDs() {
58: this .getTransactionSequenceIDsCalls.put(new Object());
59: return transactionSequenceIDs;
60: }
61:
62: public boolean startApply(NodeID nodeID,
63: TransactionID transactionID,
64: GlobalTransactionID globalTransactionID) {
65: throw new ImplementMe();
66: }
67:
68: public int size() {
69: throw new ImplementMe();
70: }
71:
72: public Collection getResentTransactionIDs() {
73: this .getTransactionIDsCalls.put(new Object());
74: return Collections.EMPTY_LIST;
75: }
76:
77: public void resendOutstandingAndUnpause() {
78: resendOutstanding();
79: unpause();
80: }
81:
82: public boolean isTransactionsForLockFlushed(LockID lockID,
83: LockFlushCallback callback) {
84: throw new ImplementMe();
85: }
86: }
|