KickJava   Java API By Example, From Geeks To Geeks.

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


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

5 package com.tc.object.tx;
6
7 import com.tc.exception.ImplementMe;
8 import com.tc.management.beans.tx.ClientTxMonitorMBean;
9 import com.tc.object.ObjectID;
10 import com.tc.object.TCObject;
11 import com.tc.object.dmi.DmiDescriptor;
12 import com.tc.object.lockmanager.api.LockID;
13 import com.tc.object.lockmanager.api.Notify;
14 import com.tc.util.SequenceID;
15
16 import java.util.Collection JavaDoc;
17 import java.util.Collections JavaDoc;
18 import java.util.HashMap JavaDoc;
19 import java.util.HashSet JavaDoc;
20 import java.util.List JavaDoc;
21 import java.util.Map JavaDoc;
22
23 public class TestClientTransaction implements ClientTransaction {
24
25   public TransactionID txID;
26   public LockID lockID;
27   public TxnType txnType;
28   private boolean hasChangesOrNotifies = true;
29   public Collection JavaDoc allLockIDs = new HashSet JavaDoc();
30   public SequenceID sequenceID;
31   public Map JavaDoc newRoots = new HashMap JavaDoc();
32   public Map JavaDoc changeBuffers = new HashMap JavaDoc();
33
34   public TestClientTransaction() {
35     super();
36   }
37
38   public Map JavaDoc getChangeBuffers() {
39     return changeBuffers;
40   }
41
42   public Map JavaDoc getNewRoots() {
43     return newRoots;
44   }
45
46   public LockID getLockID() {
47     return lockID;
48   }
49
50   public LockID[] getAllLockIDs() {
51     return (LockID[]) allLockIDs.toArray(new LockID[allLockIDs.size()]);
52   }
53
54   public TransactionID getTransactionID() {
55     return txID;
56   }
57
58   public void createObject(TCObject source) {
59     throw new ImplementMe();
60   }
61
62   public void createRoot(String JavaDoc name, ObjectID rootID) {
63     throw new ImplementMe();
64   }
65
66   public void fieldChanged(TCObject source, String JavaDoc classname, String JavaDoc fieldname, Object JavaDoc newValue, int index) {
67     throw new ImplementMe();
68   }
69
70   public void logicalInvoke(TCObject source, int method, Object JavaDoc[] parameters, String JavaDoc methodName) {
71     throw new ImplementMe();
72   }
73
74   public boolean hasChangesOrNotifies() {
75     return this.hasChangesOrNotifies;
76   }
77
78   public boolean isNull() {
79     throw new ImplementMe();
80   }
81
82   public TxnType getTransactionType() {
83     return txnType;
84   }
85
86   public void addNotify(Notify notify) {
87     throw new ImplementMe();
88   }
89
90   public List JavaDoc addNotifiesTo(List JavaDoc notifies) {
91     return notifies;
92   }
93
94   public void setSequenceID(SequenceID sequenceID) {
95     return;
96   }
97
98   public SequenceID getSequenceID() {
99     return this.sequenceID;
100   }
101
102   public boolean isConcurrent() {
103     return false;
104   }
105
106   public void setTransactionContext(TransactionContext transactionContext) {
107     throw new ImplementMe();
108   }
109
110   public void setAlreadyCommitted() {
111     throw new ImplementMe();
112   }
113
114   public boolean hasChanges() {
115     throw new ImplementMe();
116   }
117
118   public int getNotifiesCount() {
119     throw new ImplementMe();
120   }
121
122   public void arrayChanged(TCObject source, int startPos, Object JavaDoc array, int length) {
123     throw new ImplementMe();
124   }
125
126   public void updateMBean(ClientTxMonitorMBean txMBean) {
127     throw new ImplementMe();
128   }
129
130   public void literalValueChanged(TCObject source, Object JavaDoc newValue, Object JavaDoc oldValue) {
131     throw new ImplementMe();
132   }
133
134   public Collection JavaDoc getReferencesOfObjectsInTxn() {
135     return Collections.EMPTY_LIST;
136   }
137
138   public void addDmiDescritor(DmiDescriptor dd) {
139     throw new ImplementMe();
140   }
141
142   public List JavaDoc getDmiDescriptors() {
143     return Collections.EMPTY_LIST;
144   }
145
146   public boolean hasDmiDescriptors() {
147     throw new ImplementMe();
148   }
149
150 }
151
Popular Tags