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


Java CompositeMonitor类代码示例

本文整理汇总了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;
}
 
开发者ID:dcos,项目名称:exhibitor,代码行数:19,代码来源:Exhibitor.java

示例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);
}
 
开发者ID:dcos,项目名称:exhibitor,代码行数:40,代码来源:Exhibitor.java


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