當前位置: 首頁>>代碼示例>>Java>>正文


Java AgentManager類代碼示例

本文整理匯總了Java中com.cloud.agent.AgentManager的典型用法代碼示例。如果您正苦於以下問題:Java AgentManager類的具體用法?Java AgentManager怎麽用?Java AgentManager使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


AgentManager類屬於com.cloud.agent包,在下文中一共展示了AgentManager類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: BigSwitchBcfUtils

import com.cloud.agent.AgentManager; //導入依賴的package包/類
public BigSwitchBcfUtils(NetworkDao networkDao,
        NicDao nicDao, VMInstanceDao vmDao, HostDao hostDao,
        VpcDao vpcDao, BigSwitchBcfDao bigswitchBcfDao,
        AgentManager agentMgr, VlanDao vlanDao, IPAddressDao ipAddressDao,
        FirewallRulesDao fwRulesDao, FirewallRulesCidrsDao fwCidrsDao,
        NetworkACLItemDao aclItemDao, NetworkACLItemCidrsDao aclItemCidrsDao,
        NetworkModel networkModel){
    _networkDao = networkDao;
    _nicDao = nicDao;
    _vmDao = vmDao;
    _hostDao = hostDao;
    _vpcDao = vpcDao;
    _bigswitchBcfDao = bigswitchBcfDao;
    _agentMgr = agentMgr;
    _vlanDao = vlanDao;
    _ipAddressDao = ipAddressDao;
    _fwRulesDao = fwRulesDao;
    _fwCidrsDao = fwCidrsDao;
    _aclItemDao = aclItemDao;
    _aclItemCidrsDao = aclItemCidrsDao;
    _networkModel = networkModel;
}
 
開發者ID:apache,項目名稱:cloudstack,代碼行數:23,代碼來源:BigSwitchBcfUtils.java

示例2: runInContext

import com.cloud.agent.AgentManager; //導入依賴的package包/類
@Override
protected void runInContext() {
    final GlobalLock lock = GlobalLock.getInternLock("TransitionChecking");
    if (lock == null) {
        s_logger.debug("Couldn't get the global lock");
        return;
    }

    if (!lock.lock(30)) {
        s_logger.debug("Couldn't lock the db");
        return;
    }
    try {
        scanStalledVMInTransitionStateOnDisconnectedHosts();

        final List<VMInstanceVO> instances = _vmDao.findVMInTransition(new Date(new Date().getTime() - AgentManager.Wait.value() * 1000), State.Starting, State.Stopping);
        for (final VMInstanceVO instance : instances) {
            final State state = instance.getState();
            if (state == State.Stopping) {
                _haMgr.scheduleStop(instance, instance.getHostId(), WorkType.CheckStop);
            } else if (state == State.Starting) {
                _haMgr.scheduleRestart(instance, true);
            }
        }
    } catch (final Exception e) {
        s_logger.warn("Caught the following exception on transition checking", e);
    } finally {
        lock.unlock();
    }
}
 
開發者ID:MissionCriticalCloud,項目名稱:cosmic,代碼行數:31,代碼來源:VirtualMachineManagerImpl.java

示例3: SecurityGroupWorkTracker

import com.cloud.agent.AgentManager; //導入依賴的package包/類
public SecurityGroupWorkTracker(final AgentManager agentMgr, final Listener answerListener, final int bufferLength) {
    super();
    assert (bufferLength >= 1) : "SecurityGroupWorkTracker: Cannot have a zero length buffer";
    this._agentMgr = agentMgr;
    this._answerListener = answerListener;
    this._bufferLength = bufferLength;
}
 
開發者ID:MissionCriticalCloud,項目名稱:cosmic,代碼行數:8,代碼來源:SecurityGroupWorkTracker.java

示例4: AgentHookBase

import com.cloud.agent.AgentManager; //導入依賴的package包/類
public AgentHookBase(final VMInstanceDao instanceDao, final HostDao hostDao, final ConfigurationDao cfgDao, final KeystoreManager ksMgr, final AgentManager agentMgr, final
KeysManager keysMgr) {
    _instanceDao = instanceDao;
    _hostDao = hostDao;
    _agentMgr = agentMgr;
    _configDao = cfgDao;
    _ksMgr = ksMgr;
    _keysMgr = keysMgr;
}
 
開發者ID:MissionCriticalCloud,項目名稱:cosmic,代碼行數:10,代碼來源:AgentHookBase.java

示例5: runInContext

import com.cloud.agent.AgentManager; //導入依賴的package包/類
@Override
protected void runInContext() {
    final GlobalLock lock = GlobalLock.getInternLock("TransitionChecking");
    if (lock == null) {
        s_logger.debug("Couldn't get the global lock");
        return;
    }

    if (!lock.lock(30)) {
        s_logger.debug("Couldn't lock the db");
        return;
    }
    try {
        scanStalledVMInTransitionStateOnDisconnectedHosts();

        final List<VMInstanceVO> instances = _vmDao.findVMInTransition(new Date(DateUtil.currentGMTTime().getTime() - AgentManager.Wait.value() * 1000), State.Starting, State.Stopping);
        for (final VMInstanceVO instance : instances) {
            final State state = instance.getState();
            if (state == State.Stopping) {
                _haMgr.scheduleStop(instance, instance.getHostId(), WorkType.CheckStop);
            } else if (state == State.Starting) {
                _haMgr.scheduleRestart(instance, true);
            }
        }
    } catch (final Exception e) {
        s_logger.warn("Caught the following exception on transition checking", e);
    } finally {
        lock.unlock();
    }
}
 
開發者ID:apache,項目名稱:cloudstack,代碼行數:31,代碼來源:VirtualMachineManagerImpl.java

示例6: SecurityGroupWorkTracker

import com.cloud.agent.AgentManager; //導入依賴的package包/類
public SecurityGroupWorkTracker(AgentManager agentMgr, Listener answerListener, int bufferLength) {
    super();
    assert (bufferLength >= 1) : "SecurityGroupWorkTracker: Cannot have a zero length buffer";
    this._agentMgr = agentMgr;
    this._answerListener = answerListener;
    this._bufferLength = bufferLength;
}
 
開發者ID:apache,項目名稱:cloudstack,代碼行數:8,代碼來源:SecurityGroupWorkTracker.java

示例7: AgentHookBase

import com.cloud.agent.AgentManager; //導入依賴的package包/類
public AgentHookBase(VMInstanceDao instanceDao, HostDao hostDao, ConfigurationDao cfgDao, KeystoreManager ksMgr, AgentManager agentMgr, KeysManager keysMgr) {
    _instanceDao = instanceDao;
    _hostDao = hostDao;
    _agentMgr = agentMgr;
    _configDao = cfgDao;
    _ksMgr = ksMgr;
    _keysMgr = keysMgr;
}
 
開發者ID:apache,項目名稱:cloudstack,代碼行數:9,代碼來源:AgentHookBase.java

示例8: getConfigComponentName

import com.cloud.agent.AgentManager; //導入依賴的package包/類
@Override
public String getConfigComponentName() {
    return AgentManager.class.getSimpleName();
}
 
開發者ID:MissionCriticalCloud,項目名稱:cosmic,代碼行數:5,代碼來源:AgentManagerImpl.java

示例9: agentManager

import com.cloud.agent.AgentManager; //導入依賴的package包/類
@Bean
public AgentManager agentManager() {
    return Mockito.mock(AgentManager.class);
}
 
開發者ID:MissionCriticalCloud,項目名稱:cosmic,代碼行數:5,代碼來源:VMSnapshotStrategyTest.java

示例10: SecurityGroupListener

import com.cloud.agent.AgentManager; //導入依賴的package包/類
public SecurityGroupListener(final SecurityGroupManagerImpl securityGroupManager, final AgentManager agentMgr, final SecurityGroupWorkDao workDao) {
    super();
    _securityGroupManager = securityGroupManager;
    _agentMgr = agentMgr;
    _workDao = workDao;
}
 
開發者ID:MissionCriticalCloud,項目名稱:cosmic,代碼行數:7,代碼來源:SecurityGroupListener.java

示例11: SshKeysDistriMonitor

import com.cloud.agent.AgentManager; //導入依賴的package包/類
public SshKeysDistriMonitor(final AgentManager mgr, final HostDao host, final ConfigurationDao config) {
    this._agentMgr = mgr;
    _hostDao = host;
    _configDao = config;
}
 
開發者ID:MissionCriticalCloud,項目名稱:cosmic,代碼行數:6,代碼來源:SshKeysDistriMonitor.java

示例12: VmBasedAgentHook

import com.cloud.agent.AgentManager; //導入依賴的package包/類
public VmBasedAgentHook(final VMInstanceDao instanceDao, final HostDao hostDao, final ConfigurationDao cfgDao, final KeystoreManager ksMgr, final AgentManager agentMgr,
                        final KeysManager keysMgr) {
    super(instanceDao, hostDao, cfgDao, ksMgr, agentMgr, keysMgr);
}
 
開發者ID:MissionCriticalCloud,項目名稱:cosmic,代碼行數:5,代碼來源:ConsoleProxyManagerImpl.java

示例13: AgentBasedAgentHook

import com.cloud.agent.AgentManager; //導入依賴的package包/類
public AgentBasedAgentHook(final VMInstanceDao instanceDao, final HostDao hostDao, final ConfigurationDao cfgDao, final KeystoreManager ksMgr, final AgentManager
        agentMgr, final KeysManager keysMgr) {
    super(instanceDao, hostDao, cfgDao, ksMgr, agentMgr, keysMgr);
}
 
開發者ID:MissionCriticalCloud,項目名稱:cosmic,代碼行數:5,代碼來源:AgentBasedConsoleProxyManager.java

示例14: agentMgr

import com.cloud.agent.AgentManager; //導入依賴的package包/類
@Bean
public AgentManager agentMgr() {
    return Mockito.mock(AgentManager.class);
}
 
開發者ID:MissionCriticalCloud,項目名稱:cosmic,代碼行數:5,代碼來源:TemplateManagerImplTest.java

示例15: agentMgr

import com.cloud.agent.AgentManager; //導入依賴的package包/類
@Bean
public AgentManager agentMgr() {
    return new DirectAgentManagerSimpleImpl();
}
 
開發者ID:apache,項目名稱:cloudstack,代碼行數:5,代碼來源:ChildTestConfiguration.java


注:本文中的com.cloud.agent.AgentManager類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。