提交 1d53838f 编写于 作者: S sjiang

8132210: Reinforce JMX collector internals

Reviewed-by: dfuchs, ahgross
上级 4f4f27bc
...@@ -102,17 +102,13 @@ class GarbageCollectorImpl extends MemoryManagerImpl ...@@ -102,17 +102,13 @@ class GarbageCollectorImpl extends MemoryManagerImpl
GarbageCollectionNotificationInfo.GARBAGE_COLLECTION_NOTIFICATION GarbageCollectionNotificationInfo.GARBAGE_COLLECTION_NOTIFICATION
}; };
private MBeanNotificationInfo[] notifInfo = null; @Override
public MBeanNotificationInfo[] getNotificationInfo() { public MBeanNotificationInfo[] getNotificationInfo() {
synchronized (this) { return new MBeanNotificationInfo[]{
if (notifInfo == null) { new MBeanNotificationInfo(gcNotifTypes,
notifInfo = new MBeanNotificationInfo[1]; notifName,
notifInfo[0] = new MBeanNotificationInfo(gcNotifTypes, "GC Notification")
notifName, };
"GC Notification");
}
}
return notifInfo;
} }
private static long seqNumber = 0; private static long seqNumber = 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册