当前位置: 首页>>代码示例>>Java>>正文


Java U.IGNITE_MBEANS_DISABLED属性代码示例

本文整理汇总了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);
    }
}
 
开发者ID:apache,项目名称:ignite,代码行数:22,代码来源:GridCacheDatabaseSharedManager.java

示例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);
    }
}
 
开发者ID:apache,项目名称:ignite,代码行数:25,代码来源:IgniteCacheDatabaseSharedManager.java

示例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);
    }
}
 
开发者ID:apache,项目名称:ignite,代码行数:25,代码来源:GridTcpRouterImpl.java

示例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);
    }
}
 
开发者ID:apache,项目名称:ignite,代码行数:15,代码来源:IgniteCacheDatabaseSharedManager.java


注:本文中的org.apache.ignite.internal.util.typedef.internal.U.IGNITE_MBEANS_DISABLED属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。