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


Java U.makeMBeanName方法代码示例

本文整理汇总了Java中org.apache.ignite.internal.util.typedef.internal.U.makeMBeanName方法的典型用法代码示例。如果您正苦于以下问题:Java U.makeMBeanName方法的具体用法?Java U.makeMBeanName怎么用?Java U.makeMBeanName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.ignite.internal.util.typedef.internal.U的用法示例。


在下文中一共展示了U.makeMBeanName方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: mxBean

import org.apache.ignite.internal.util.typedef.internal.U; //导入方法依赖的package包/类
/**
 * Gets CacheGroupMetricsMXBean for given node and group name.
 *
 * @param nodeIdx Node index.
 * @param cacheOrGrpName Cache group name.
 * @return MBean instance.
 */
private CacheGroupMetricsMXBean mxBean(int nodeIdx, String cacheOrGrpName) throws MalformedObjectNameException {
    ObjectName mbeanName = U.makeMBeanName(getTestIgniteInstanceName(nodeIdx), "Cache groups", cacheOrGrpName);

    MBeanServer mbeanSrv = ManagementFactory.getPlatformMBeanServer();

    if (!mbeanSrv.isRegistered(mbeanName))
        fail("MBean is not registered: " + mbeanName.getCanonicalName());

    return MBeanServerInvocationHandler.newProxyInstance(mbeanSrv, mbeanName, CacheGroupMetricsMXBean.class,
        true);
}
 
开发者ID:apache,项目名称:ignite,代码行数:19,代码来源:CacheGroupMetricsMBeanTest.java

示例2: mbean

import org.apache.ignite.internal.util.typedef.internal.U; //导入方法依赖的package包/类
/**
 * Gets TcpCommunicationSpiMBean for given node.
 *
 * @param nodeIdx Node index.
 * @return MBean instance.
 */
private TcpCommunicationSpiMBean mbean(int nodeIdx) throws MalformedObjectNameException {
    ObjectName mbeanName = U.makeMBeanName(getTestIgniteInstanceName(nodeIdx), "SPIs",
        SynchronizedCommunicationSpi.class.getSimpleName());

    MBeanServer mbeanServer = ManagementFactory.getPlatformMBeanServer();

    if (mbeanServer.isRegistered(mbeanName))
        return MBeanServerInvocationHandler.newProxyInstance(mbeanServer, mbeanName, TcpCommunicationSpiMBean.class,
            true);
    else
        fail("MBean is not registered: " + mbeanName.getCanonicalName());

    return null;
}
 
开发者ID:apache,项目名称:ignite,代码行数:21,代码来源:TcpCommunicationStatisticsTest.java

示例3: mxBean

import org.apache.ignite.internal.util.typedef.internal.U; //导入方法依赖的package包/类
/**
 * Gets CacheGroupMetricsMXBean for given node and group name.
 *
 * @param nodeIdx Node index.
 * @param cacheName Cache name.
 * @return MBean instance.
 */
private CacheMetricsMXBean mxBean(int nodeIdx, String cacheName, Class<? extends CacheMetricsMXBean> clazz)
    throws MalformedObjectNameException {
    ObjectName mbeanName = U.makeMBeanName(getTestIgniteInstanceName(nodeIdx), cacheName,
        clazz.getName());

    MBeanServer mbeanSrv = ManagementFactory.getPlatformMBeanServer();

    if (!mbeanSrv.isRegistered(mbeanName))
        fail("MBean is not registered: " + mbeanName.getCanonicalName());

    return MBeanServerInvocationHandler.newProxyInstance(mbeanSrv, mbeanName, CacheMetricsMXBean.class,
        true);
}
 
开发者ID:apache,项目名称:ignite,代码行数:21,代码来源:CacheMetricsEnableRuntimeTest.java

示例4: checkMBeanRegistration

import org.apache.ignite.internal.util.typedef.internal.U; //导入方法依赖的package包/类
/** Test MBean registration. */
private void checkMBeanRegistration(String grp, String name) throws Exception {
    // Node should start and stop with no errors.
    try (Ignite ignite = startGrid(0)) {
        MBeanServer srv = ignite.configuration().getMBeanServer();

        U.registerMBean(srv, ignite.name(), grp, name, new DummyMBeanImpl(), DummyMBean.class);

        ObjectName objName = U.makeMBeanName(ignite.name(), grp, name + '2');
        U.registerMBean(srv, objName, new DummyMBeanImpl(), DummyMBean.class);
    }
}
 
开发者ID:apache,项目名称:ignite,代码行数:13,代码来源:GridMBeanExoticNamesSelfTest.java

示例5: JmxClusterMetricsHelper

import org.apache.ignite.internal.util.typedef.internal.U; //导入方法依赖的package包/类
/**
 * @param cfg Ignite configuration.
 * @throws MalformedObjectNameException Thrown in case of any errors.
 */
private JmxClusterMetricsHelper(IgniteConfiguration cfg, Class<? extends ClusterMetricsMXBean> clazz) throws MalformedObjectNameException {
    this.mbeanSrv = cfg.getMBeanServer();

    this.mbean = U.makeMBeanName(cfg.getIgniteInstanceName(), "Kernal", clazz.getSimpleName());
}
 
开发者ID:apache,项目名称:ignite,代码行数:10,代码来源:ClusterNodeMetricsSelfTest.java


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