250 @Override
251 public long getTotalCapacity() {
252 return pool.getTotalCapacity();
253 }
254 @Override
255 public long getMemoryUsed() {
256 return pool.getMemoryUsed();
257 }
258 };
259 }
260
261 private static HotSpotDiagnostic hsDiagMBean = null;
262 private static HotspotRuntime hsRuntimeMBean = null;
263 private static HotspotClassLoading hsClassMBean = null;
264 private static HotspotThread hsThreadMBean = null;
265 private static HotspotCompilation hsCompileMBean = null;
266 private static HotspotMemory hsMemoryMBean = null;
267
268 public static synchronized HotSpotDiagnosticMXBean getDiagnosticMXBean() {
269 if (hsDiagMBean == null) {
270 hsDiagMBean = new HotSpotDiagnostic();
271 }
272 return hsDiagMBean;
273 }
274
275 /**
276 * This method is for testing only.
277 */
278 public static synchronized HotspotRuntimeMBean getHotspotRuntimeMBean() {
279 if (hsRuntimeMBean == null) {
280 hsRuntimeMBean = new HotspotRuntime(jvm);
281 }
282 return hsRuntimeMBean;
283 }
284
285 /**
286 * This method is for testing only.
287 */
288 public static synchronized HotspotClassLoadingMBean getHotspotClassLoadingMBean() {
289 if (hsClassMBean == null) {
290 hsClassMBean = new HotspotClassLoading(jvm);
|
250 @Override
251 public long getTotalCapacity() {
252 return pool.getTotalCapacity();
253 }
254 @Override
255 public long getMemoryUsed() {
256 return pool.getMemoryUsed();
257 }
258 };
259 }
260
261 private static HotSpotDiagnostic hsDiagMBean = null;
262 private static HotspotRuntime hsRuntimeMBean = null;
263 private static HotspotClassLoading hsClassMBean = null;
264 private static HotspotThread hsThreadMBean = null;
265 private static HotspotCompilation hsCompileMBean = null;
266 private static HotspotMemory hsMemoryMBean = null;
267
268 public static synchronized HotSpotDiagnosticMXBean getDiagnosticMXBean() {
269 if (hsDiagMBean == null) {
270 hsDiagMBean = new HotSpotDiagnostic(jvm);
271 }
272 return hsDiagMBean;
273 }
274
275 /**
276 * This method is for testing only.
277 */
278 public static synchronized HotspotRuntimeMBean getHotspotRuntimeMBean() {
279 if (hsRuntimeMBean == null) {
280 hsRuntimeMBean = new HotspotRuntime(jvm);
281 }
282 return hsRuntimeMBean;
283 }
284
285 /**
286 * This method is for testing only.
287 */
288 public static synchronized HotspotClassLoadingMBean getHotspotClassLoadingMBean() {
289 if (hsClassMBean == null) {
290 hsClassMBean = new HotspotClassLoading(jvm);
|