本文整理汇总了Java中com.netflix.servo.monitor.CompositeMonitor类的典型用法代码示例。如果您正苦于以下问题:Java CompositeMonitor类的具体用法?Java CompositeMonitor怎么用?Java CompositeMonitor使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
CompositeMonitor类属于com.netflix.servo.monitor包,在下文中一共展示了CompositeMonitor类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initServo
import com.netflix.servo.monitor.CompositeMonitor; //导入依赖的package包/类
private static RepeatingActivity initServo(Exhibitor exhibitor, ActivityLog log, ActivityQueue activityQueue, ExhibitorArguments arguments, AtomicReference<CompositeMonitor<?>> theMonitor)
{
theMonitor.set(null);
RepeatingActivity localServoMonitoring = null;
if ( arguments.servoRegistration != null )
{
ZookeeperMonitoredData zookeeperMonitoredData = new ZookeeperMonitoredData();
CompositeMonitor<?> compositeMonitor = Monitors.newObjectMonitor(zookeeperMonitoredData);
GetMonitorData getMonitorData = new GetMonitorData(exhibitor, zookeeperMonitoredData);
localServoMonitoring = new RepeatingActivityImpl(log, activityQueue, QueueGroups.IO, getMonitorData, arguments.servoRegistration.getZookeeperPollMs());
arguments.servoRegistration.getMonitorRegistry().register(compositeMonitor);
theMonitor.set(compositeMonitor);
}
return localServoMonitoring;
}
示例2: Exhibitor
import com.netflix.servo.monitor.CompositeMonitor; //导入依赖的package包/类
/**
* @param configProvider config source
* @param additionalUITabs any additional tabs in the UI (can be null)
* @param backupProvider backup provider or null
* @param arguments startup arguments
* @throws IOException errors
*/
public Exhibitor(ConfigProvider configProvider, Collection<? extends UITab> additionalUITabs, BackupProvider backupProvider, ExhibitorArguments arguments) throws Exception
{
System.out.println(getVersion());
this.arguments = arguments;
log = new ActivityLog(arguments.logWindowSizeLines);
this.configManager = new ConfigManager(this, configProvider, arguments.configCheckMs);
this.additionalUITabs = (additionalUITabs != null) ? ImmutableList.copyOf(additionalUITabs) : ImmutableList.<UITab>of();
this.processOperations = new StandardProcessOperations(this);
monitorRunningInstance = new MonitorRunningInstance(this);
cleanupManager = new CleanupManager(this);
indexCache = new IndexCache(log);
processMonitor = new ProcessMonitor(this);
autoInstanceManagement = new RepeatingActivityImpl(log, activityQueue, QueueGroups.MAIN, new AutomaticInstanceManagement(this), getAutoInstanceManagementPeriod());
if(arguments.httpsConfiguration.getServerKeystorePath() != null)
{
remoteInstanceRequestClient = new RemoteInstanceRequestHttpsClientImpl(arguments.remoteConnectionConfiguration, arguments.httpsConfiguration);
}
else
{
remoteInstanceRequestClient = new RemoteInstanceRequestClientImpl(arguments.remoteConnectionConfiguration);
}
AtomicReference<CompositeMonitor<?>> theMonitor = new AtomicReference<CompositeMonitor<?>>();
servoMonitoring = initServo(this, log, activityQueue, arguments, theMonitor);
servoCompositeMonitor = theMonitor.get();
controlPanelValues = new ControlPanelValues(getPreferences());
this.backupManager = new BackupManager(this, backupProvider);
}