KickJava   Java API By Example, From Geeks To Geeks.

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


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.management.beans.tx.ClientTxMonitorMBean;
7 import com.tc.net.protocol.tcm.ChannelIDProvider;
8 import com.tc.object.ObjectID;
9 import com.tc.object.TCObject;
10 import com.tc.object.dmi.DmiDescriptor;
11 import com.tc.object.lockmanager.api.Notify;
12
13 import java.util.Collection JavaDoc;
14 import java.util.Collections JavaDoc;
15 import java.util.List JavaDoc;
16 import java.util.Map JavaDoc;
17
18 public class NullClientTransaction extends AbstractClientTransaction {
19
20   public NullClientTransaction(TransactionID transactionID, ChannelIDProvider cidProvider) {
21     super(transactionID, cidProvider);
22   }
23
24   public boolean hasChangesOrNotifies() {
25     return false;
26   }
27
28   public boolean hasChanges() {
29     return false;
30   }
31
32   public Map JavaDoc getNewRoots() {
33     return Collections.EMPTY_MAP;
34   }
35
36   protected void basicCreate(TCObject source) {
37     // null do nothing
38
}
39
40   protected void basicCreateRoot(String JavaDoc name, ObjectID rootID) {
41     // null do nothing
42
}
43
44   protected void basicFieldChanged(TCObject source, String JavaDoc classname, String JavaDoc fieldname, Object JavaDoc newValue, int index) {
45     // null do nothing
46
}
47
48   protected void basicLogicalInvoke(TCObject source, int method, Object JavaDoc[] parameters) {
49     // null do nothing
50
}
51
52   public boolean isNull() {
53     return true;
54   }
55
56   public Map JavaDoc getChangeBuffers() {
57     return Collections.EMPTY_MAP;
58   }
59
60   public void addNotify(Notify notify) {
61     return;
62   }
63
64   public List JavaDoc addNotifiesTo(List JavaDoc notifies) {
65     return notifies;
66   }
67
68   public boolean isConcurrent() {
69     return false;
70   }
71
72   protected void basicArrayChanged(TCObject source, int startPos, Object JavaDoc array, int length) {
73     // null do nothing
74
}
75
76   public int getNotifiesCount() {
77     return 0;
78   }
79
80   public void updateMBean(ClientTxMonitorMBean txMBean) {
81     // null do nothing
82
}
83
84   protected void basicLiteralValueChanged(TCObject source, Object JavaDoc newValue, Object JavaDoc oldValue) {
85     // do nothingg
86
}
87
88   public Collection JavaDoc getReferencesOfObjectsInTxn() {
89     return Collections.EMPTY_LIST;
90   }
91
92   public void addDmiDescritor(DmiDescriptor dd) {
93     return;
94   }
95
96   public boolean hasDmiDescriptors() {
97     return false;
98   }
99
100   public List JavaDoc getDmiDescriptors() {
101     return Collections.EMPTY_LIST;
102   }
103
104 }
105
Popular Tags