KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tc > object > bytecode > NullManager


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.bytecode;
6
7 import com.tc.cluster.ClusterEventListener;
8 import com.tc.logging.TCLogger;
9 import com.tc.management.beans.sessions.SessionMonitorMBean;
10 import com.tc.object.ObjectID;
11 import com.tc.object.TCObject;
12 import com.tc.object.event.DmiManager;
13 import com.tc.properties.TCProperties;
14
15 public final class NullManager implements Manager {
16
17   public static final String JavaDoc CLASS = "com/tc/object/bytecode/NullManager";
18   public static final String JavaDoc TYPE = "L" + CLASS + ";";
19
20   private static final Manager INSTANCE = new NullManager();
21
22   public static Manager getInstance() {
23     return INSTANCE;
24   }
25
26   private NullManager() {
27     //
28
}
29
30   public final void init() {
31     //
32
}
33
34   public final void stop() {
35     //
36
}
37
38   public final Object JavaDoc lookupOrCreateRoot(String JavaDoc name, Object JavaDoc object) {
39     throw new UnsupportedOperationException JavaDoc();
40   }
41
42   public final Object JavaDoc lookupOrCreateRootNoDepth(String JavaDoc name, Object JavaDoc obj) {
43     throw new UnsupportedOperationException JavaDoc();
44   }
45
46   public final Object JavaDoc createOrReplaceRoot(String JavaDoc name, Object JavaDoc object) {
47     throw new UnsupportedOperationException JavaDoc();
48   }
49
50   public final void beginLock(String JavaDoc lockID, int type) {
51     //
52
}
53
54   public final TCObject lookupExistingOrNull(Object JavaDoc obj) {
55     return null;
56   }
57
58   public final void objectNotify(Object JavaDoc obj) {
59     obj.notify();
60   }
61
62   public final void objectNotifyAll(Object JavaDoc obj) {
63     obj.notifyAll();
64   }
65
66   public final void objectWait0(Object JavaDoc obj) throws InterruptedException JavaDoc {
67     obj.wait();
68   }
69
70   public final void objectWait1(Object JavaDoc obj, long millis) throws InterruptedException JavaDoc {
71     obj.wait(millis);
72   }
73
74   public final void objectWait2(Object JavaDoc obj, long millis, int nanos) throws InterruptedException JavaDoc {
75     obj.wait(millis, nanos);
76   }
77
78   public final void monitorEnter(Object JavaDoc obj, int type) {
79     //
80
}
81
82   public final void monitorExit(Object JavaDoc obj) {
83     //
84
}
85
86   public final void logicalInvoke(Object JavaDoc object, String JavaDoc methodName, Object JavaDoc[] params) {
87     //
88
}
89
90   public final boolean distributedMethodCall(Object JavaDoc receiver, String JavaDoc method, Object JavaDoc[] params, boolean runOnAllNodes) {
91     return true;
92   }
93
94   public void distributedMethodCallCommit() {
95     //
96
}
97
98   public final void checkWriteAccess(Object JavaDoc context) {
99     //
100
}
101
102   public final boolean isManaged(Object JavaDoc object) {
103     return false;
104   }
105
106   public final boolean isLogical(Object JavaDoc object) {
107     throw new UnsupportedOperationException JavaDoc();
108   }
109
110   public final boolean isRoot(String JavaDoc className, String JavaDoc fieldName) {
111     return false;
112   }
113
114   public final Object JavaDoc deepCopy(Object JavaDoc source) {
115     throw new UnsupportedOperationException JavaDoc();
116   }
117
118   public final Object JavaDoc lookupRoot(String JavaDoc name) {
119     throw new UnsupportedOperationException JavaDoc();
120   }
121
122   public final void optimisticBegin() {
123     throw new UnsupportedOperationException JavaDoc();
124   }
125
126   public final void optimisticCommit() {
127     throw new UnsupportedOperationException JavaDoc();
128   }
129
130   public final void optimisticRollback() {
131     throw new UnsupportedOperationException JavaDoc();
132   }
133
134   public final void beginVolatile(TCObject tcObject, String JavaDoc fieldName, int type) {
135     // do nothing
136
}
137
138   public final void commitLock(String JavaDoc lockName) {
139     // do nothing
140
}
141
142   public final boolean isLocked(Object JavaDoc obj) {
143     return false;
144   }
145
146   public final int queueLength(Object JavaDoc obj) {
147     return 0;
148   }
149
150   public final void commitVolatile(TCObject tcObject, String JavaDoc fieldName) {
151     //
152
}
153
154   public final int waitLength(Object JavaDoc obj) {
155     return 0;
156   }
157
158   public final boolean isHeldByCurrentThread(Object JavaDoc obj, int lockLevel) {
159     throw new UnsupportedOperationException JavaDoc();
160   }
161
162   public final void logicalInvokeWithTransaction(Object JavaDoc object, Object JavaDoc lockObject, String JavaDoc methodName, Object JavaDoc[] params) {
163     throw new UnsupportedOperationException JavaDoc();
164   }
165
166   public final boolean tryMonitorEnter(Object JavaDoc obj, int type) {
167     throw new UnsupportedOperationException JavaDoc();
168   }
169
170   public boolean tryBeginLock(String JavaDoc lockID, int type) {
171     throw new UnsupportedOperationException JavaDoc();
172   }
173
174   public final TCObject shareObjectIfNecessary(Object JavaDoc pojo) {
175     throw new UnsupportedOperationException JavaDoc();
176   }
177
178   public final boolean isCreationInProgress() {
179     return false;
180   }
181
182   public final boolean isPhysicallyInstrumented(Class JavaDoc clazz) {
183     return false;
184   }
185
186   public final String JavaDoc getClientID() {
187     // XXX: even though this should *probably* throw UnsupportedOperationException, because some innocent tests use
188
// ManagerUtil (e.g. ConfigPropertiesTest), it was decided to return "" from this method.
189
return "";
190   }
191
192   public final TCLogger getLogger(String JavaDoc loggerName) {
193     throw new UnsupportedOperationException JavaDoc();
194   }
195
196   public final Object JavaDoc getMBean(String JavaDoc objectName) {
197     throw new UnsupportedOperationException JavaDoc();
198   }
199
200   public final SessionMonitorMBean getSessionMonitorMBean() {
201     throw new UnsupportedOperationException JavaDoc();
202   }
203
204   public final TCObject lookupOrCreate(Object JavaDoc obj) {
205     throw new UnsupportedOperationException JavaDoc();
206   }
207
208   public final Object JavaDoc lookupObject(ObjectID id) {
209     throw new UnsupportedOperationException JavaDoc();
210   }
211
212   public final TCProperties getTCProperites() {
213     throw new UnsupportedOperationException JavaDoc();
214   }
215
216   public void addClusterEventListener(ClusterEventListener cel) {
217     throw new UnsupportedOperationException JavaDoc();
218   }
219
220   public DmiManager getDmiManager() {
221     throw new UnsupportedOperationException JavaDoc();
222   }
223
224 }
225
Popular Tags