本文整理汇总了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);
}
示例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;
}
示例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);
}
示例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);
}
}
示例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());
}