本文整理汇总了Java中org.apache.ignite.internal.util.typedef.internal.U.IGNITE_MBEANS_DISABLED属性的典型用法代码示例。如果您正苦于以下问题:Java U.IGNITE_MBEANS_DISABLED属性的具体用法?Java U.IGNITE_MBEANS_DISABLED怎么用?Java U.IGNITE_MBEANS_DISABLED使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.apache.ignite.internal.util.typedef.internal.U
的用法示例。
在下文中一共展示了U.IGNITE_MBEANS_DISABLED属性的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: registrateMetricsMBean
/**
* Try to register Metrics MBean.
*
* @throws IgniteCheckedException If failed.
*/
private void registrateMetricsMBean() throws IgniteCheckedException {
if (U.IGNITE_MBEANS_DISABLED)
return;
try {
persistenceMetricsMbeanName = U.registerMBean(
cctx.kernalContext().config().getMBeanServer(),
cctx.kernalContext().igniteInstanceName(),
MBEAN_GROUP,
MBEAN_NAME,
persStoreMetrics,
DataStorageMetricsMXBean.class);
}
catch (Throwable e) {
throw new IgniteCheckedException("Failed to register " + MBEAN_NAME + " MBean.", e);
}
}
示例2: unregisterMBean
/**
* Unregister MBean.
* @param name Name of mbean.
*/
private void unregisterMBean(String name) {
if(U.IGNITE_MBEANS_DISABLED)
return;
IgniteConfiguration cfg = cctx.gridConfig();
try {
cfg.getMBeanServer().unregisterMBean(
U.makeMBeanName(
cfg.getIgniteInstanceName(),
"DataRegionMetrics", name
));
}
catch (InstanceNotFoundException ignored) {
// We tried to unregister a non-existing MBean, not a big deal.
}
catch (Throwable e) {
U.error(log, "Failed to unregister MBean for memory metrics: " +
name, e);
}
}
示例3: registerMBean
/**
* Try to register MBean.
*/
private void registerMBean() {
if (U.IGNITE_MBEANS_DISABLED)
return;
try {
ObjectName objName = U.registerMBean(
ManagementFactory.getPlatformMBeanServer(),
"Router",
"TCP Router " + id,
getClass().getSimpleName(),
this,
GridTcpRouterMBean.class);
if (log.isDebugEnabled())
log.debug("Registered MBean: " + objName);
mbeanName = objName;
}
catch (JMException e) {
U.error(log, "Failed to register MBean.", e);
}
}
示例4: registerMetricsMBeans
/**
* Registers MBeans for all DataRegionMetrics configured in this instance.
*/
private void registerMetricsMBeans() {
if(U.IGNITE_MBEANS_DISABLED)
return;
IgniteConfiguration cfg = cctx.gridConfig();
for (DataRegionMetrics memMetrics : memMetricsMap.values()) {
DataRegionConfiguration memPlcCfg = dataRegionMap.get(memMetrics.getName()).config();
registerMetricsMBean((DataRegionMetricsImpl)memMetrics, memPlcCfg, cfg);
}
}