本文整理汇总了Java中org.apache.cassandra.locator.EndpointSnitchInfo类的典型用法代码示例。如果您正苦于以下问题:Java EndpointSnitchInfo类的具体用法?Java EndpointSnitchInfo怎么用?Java EndpointSnitchInfo使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
EndpointSnitchInfo类属于org.apache.cassandra.locator包,在下文中一共展示了EndpointSnitchInfo类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: main
import org.apache.cassandra.locator.EndpointSnitchInfo; //导入依赖的package包/类
public static void main(String[] args) throws Exception {
System.out.println("Connecting to " + config.getBaseUrl());
System.out.println("Starting the JMX server");
MBeanServer server = getPlatformMBeanServer();
for (Class<? extends APIMBean> clazz : asList(StorageService.class, StorageProxy.class, MessagingService.class,
CommitLog.class, Gossiper.class, EndpointSnitchInfo.class, FailureDetector.class, CacheService.class,
CompactionManager.class, GCInspector.class, StreamManager.class)) {
Constructor<? extends APIMBean> c = clazz.getDeclaredConstructor(APIClient.class);
APIMBean m = c.newInstance(client);
server.registerMBean(m, null);
}
try {
// forces check for dynamically created mbeans
server.queryNames(null, null);
} catch (IllegalStateException e) {
// ignore this. Just means we started before scylla.
}
String jmxPort = System.getProperty("com.sun.management.jmxremote.port");
System.out.println("JMX is enabled to receive remote connections on port: " + jmxPort);
for (;;) {
Thread.sleep(Long.MAX_VALUE);
}
}