KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tc > object > tx > TestRemoteTransactionManager


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.tx;
5
6 import com.tc.exception.ImplementMe;
7 import com.tc.object.lockmanager.api.LockFlushCallback;
8 import com.tc.object.lockmanager.api.LockID;
9 import com.tc.object.session.SessionID;
10 import com.tc.util.concurrent.NoExceptionLinkedQueue;
11
12 import java.util.Collection JavaDoc;
13 import java.util.Map JavaDoc;
14
15 /**
16  * @author steve
17  */

18 public class TestRemoteTransactionManager implements RemoteTransactionManager {
19 // public final NoExceptionLinkedQueue resendOutstandingContexts = new NoExceptionLinkedQueue();
20
// public final NoExceptionLinkedQueue pauseCalls = new NoExceptionLinkedQueue();
21
// public final NoExceptionLinkedQueue unpauseCalls = new NoExceptionLinkedQueue();
22
public final NoExceptionLinkedQueue isChangeListenerCalls = new NoExceptionLinkedQueue();
23
24   public LockID[] ids;
25   public Map JavaDoc changes;
26   public TransactionID txID;
27   public Map JavaDoc newRoots;
28   public TransactionID acked;
29   public TxnType transactionType;
30   public TxnBatchID batchAcked;
31   public ClientTransaction transaction;
32
33   public void commit(ClientTransaction txn) {
34     this.ids = txn.getAllLockIDs();
35     this.changes = txn.getChangeBuffers();
36     this.txID = txn.getTransactionID();
37     this.newRoots = txn.getNewRoots();
38     this.transactionType = txn.getTransactionType();
39     this.transaction = txn;
40   }
41
42   public void receivedAcknowledgement(SessionID sessionID, TransactionID ackTxID) {
43     this.acked = ackTxID;
44   }
45
46   public void receivedBatchAcknowledgement(TxnBatchID batchID) {
47     this.batchAcked = batchID;
48   }
49
50   public int getPendingBatchSize() {
51     throw new ImplementMe();
52   }
53
54   public void resendOutstanding() {
55     //this.resendOutstandingContexts.put(new Object());
56
throw new ImplementMe();
57   }
58
59   public void pause() {
60     //this.pauseCalls.put(new Object());
61
throw new ImplementMe();
62   }
63
64   public void unpause() {
65     //this.pauseCalls.put(new Object());
66
throw new ImplementMe();
67   }
68
69   public void flush(LockID lockID) {
70     throw new ImplementMe();
71   }
72
73   public Collection JavaDoc getTransactionSequenceIDs() {
74     throw new ImplementMe();
75   }
76
77   public void stop() {
78     throw new ImplementMe();
79
80   }
81
82   public void starting() {
83     throw new ImplementMe();
84
85   }
86
87   public Collection JavaDoc getResentTransactionIDs() {
88     throw new ImplementMe();
89   }
90
91   public void resendOutstandingAndUnpause() {
92     throw new ImplementMe();
93   }
94
95   public boolean isTransactionsForLockFlushed(LockID lockID, LockFlushCallback callback) {
96     throw new ImplementMe();
97   }
98
99   public void stopProcessing() {
100     throw new ImplementMe();
101   }
102 }
Popular Tags