Java源码示例:org.apache.cassandra.gms.FailureDetectorMBean
示例1
public static MBeanGroupMetricFamilyCollector.Factory factory(final MetadataFactory metadataFactory) {
return mBean -> {
if (GOSSIPER_MBEAN_NAME.apply(mBean.name)) {
return new RemoteGossiperMBeanMetricFamilyCollector(metadataFactory, (GossiperMBean) mBean.object, null);
}
if (FAILURE_DETECTOR_MBEAN_NAME.apply(mBean.name)) {
return new RemoteGossiperMBeanMetricFamilyCollector(metadataFactory, null, (FailureDetectorMBean) mBean.object);
}
return null;
};
}
示例2
public static Factory factory(final MetadataFactory metadataFactory) {
return mBean -> {
if (!FAILURE_DETECTOR_MBEAN_NAME.apply(mBean.name))
return null;
return new FailureDetectorMBeanMetricFamilyCollector((FailureDetectorMBean) mBean.object, metadataFactory);
};
}
示例3
private JmxProxyImpl(
String host,
String hostBeforeTranslation,
JMXConnector jmxConnector,
StorageServiceMBean ssProxy,
MBeanServerConnection mbeanServer,
CompactionManagerMBean cmProxy,
EndpointSnitchInfoMBean endpointSnitchMbean,
FailureDetectorMBean fdProxy,
MetricRegistry metricRegistry,
Optional<StreamManagerMBean> smProxy,
DiagnosticEventPersistenceMBean diagEventProxy,
LastEventIdBroadcasterMBean lastEventIdProxy,
Jmxmp jmxmp) {
this.host = host;
this.hostBeforeTranslation = hostBeforeTranslation;
this.jmxConnector = jmxConnector;
this.mbeanServer = mbeanServer;
this.ssProxy = ssProxy;
this.cmProxy = cmProxy;
this.endpointSnitchMbean = endpointSnitchMbean;
this.clusterName = Cluster.toSymbolicName(ssProxy.getClusterName());
this.fdProxy = fdProxy;
this.diagEventProxy = diagEventProxy;
this.lastEventIdProxy = lastEventIdProxy;
this.metricRegistry = metricRegistry;
this.smProxy = smProxy;
this.jmxmp = jmxmp;
registerConnectionsGauge();
}
示例4
private RemoteGossiperMBeanMetricFamilyCollector(final MetadataFactory metadataFactory, final GossiperMBean gossiperMBean, final FailureDetectorMBean failureDetectorMBean) {
this.metadataFactory = metadataFactory;
this.gossiperMBean = gossiperMBean;
this.failureDetectorMBean = failureDetectorMBean;
}
示例5
private FailureDetectorMBeanMetricFamilyCollector(final FailureDetectorMBean failureDetector, final MetadataFactory metadataFactory) {
this.failureDetector = failureDetector;
this.metadataFactory = metadataFactory;
}
示例6
FailureDetectorMBean getFailureDetectorMBean() {
return fdProxy;
}