本文整理匯總了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;
}
示例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();
}
}
示例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;
}
示例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;
}
示例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();
}
}
示例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;
}
示例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;
}
示例8: getConfigComponentName
import com.cloud.agent.AgentManager; //導入依賴的package包/類
@Override
public String getConfigComponentName() {
return AgentManager.class.getSimpleName();
}
示例9: agentManager
import com.cloud.agent.AgentManager; //導入依賴的package包/類
@Bean
public AgentManager agentManager() {
return Mockito.mock(AgentManager.class);
}
示例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;
}
示例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;
}
示例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);
}
示例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);
}
示例14: agentMgr
import com.cloud.agent.AgentManager; //導入依賴的package包/類
@Bean
public AgentManager agentMgr() {
return Mockito.mock(AgentManager.class);
}
示例15: agentMgr
import com.cloud.agent.AgentManager; //導入依賴的package包/類
@Bean
public AgentManager agentMgr() {
return new DirectAgentManagerSimpleImpl();
}