test_class.declarator: s_logger = LoggerFactory.getLogger(HighAvailabilityManagerImplTest.class)
test_class.modifier: private static final
test_class.original_string: private static final Logger s_logger = LoggerFactory.getLogger(HighAvailabilityManagerImplTest.class);
test_class.type: Logger
test_class.var_name: s_logger
test_class.declarator: processWorkMethod = null
test_class.modifier: static
test_class.original_string: static Method processWorkMethod = null;
test_class.type: Method
test_class.var_name: processWorkMethod
test_class.declarator: _haDao
test_class.modifier: @Mock
test_class.original_string: @Mock
      HighAvailabilityDao _haDao;
test_class.type: HighAvailabilityDao
test_class.var_name: _haDao
test_class.declarator: _instanceDao
test_class.modifier: @Mock
test_class.original_string: @Mock
      VMInstanceDao _instanceDao;
test_class.type: VMInstanceDao
test_class.var_name: _instanceDao
test_class.declarator: _hostDao
test_class.modifier: @Mock
test_class.original_string: @Mock
      HostDao _hostDao;
test_class.type: HostDao
test_class.var_name: _hostDao
test_class.declarator: _podDao
test_class.modifier: @Mock
test_class.original_string: @Mock
      HostPodDao _podDao;
test_class.type: HostPodDao
test_class.var_name: _podDao
test_class.declarator: _clusterDetailsDao
test_class.modifier: @Mock
test_class.original_string: @Mock
      ClusterDetailsDao _clusterDetailsDao;
test_class.type: ClusterDetailsDao
test_class.var_name: _clusterDetailsDao
test_class.declarator: _serviceOfferingDao
test_class.modifier: @Mock
test_class.original_string: @Mock
      ServiceOfferingDao _serviceOfferingDao;
test_class.type: ServiceOfferingDao
test_class.var_name: _serviceOfferingDao
test_class.declarator: _managedContext
test_class.modifier: @Mock
test_class.original_string: @Mock
      ManagedContext _managedContext;
test_class.type: ManagedContext
test_class.var_name: _managedContext
test_class.declarator: _agentMgr
test_class.modifier: @Mock
test_class.original_string: @Mock
      AgentManager _agentMgr;
test_class.type: AgentManager
test_class.var_name: _agentMgr
test_class.declarator: _alertMgr
test_class.modifier: @Mock
test_class.original_string: @Mock
      AlertManager _alertMgr;
test_class.type: AlertManager
test_class.var_name: _alertMgr
test_class.declarator: _storageMgr
test_class.modifier: @Mock
test_class.original_string: @Mock
      StorageManager _storageMgr;
test_class.type: StorageManager
test_class.var_name: _storageMgr
test_class.declarator: _guestOSDao
test_class.modifier: @Mock
test_class.original_string: @Mock
      GuestOSDao _guestOSDao;
test_class.type: GuestOSDao
test_class.var_name: _guestOSDao
test_class.declarator: _guestOSCategoryDao
test_class.modifier: @Mock
test_class.original_string: @Mock
      GuestOSCategoryDao _guestOSCategoryDao;
test_class.type: GuestOSCategoryDao
test_class.var_name: _guestOSCategoryDao
test_class.declarator: _itMgr
test_class.modifier: @Mock
test_class.original_string: @Mock
      VirtualMachineManager _itMgr;
test_class.type: VirtualMachineManager
test_class.var_name: _itMgr
test_class.declarator: _accountMgr
test_class.modifier: @Mock
test_class.original_string: @Mock
      AccountManager _accountMgr;
test_class.type: AccountManager
test_class.var_name: _accountMgr
test_class.declarator: _resourceMgr
test_class.modifier: @Mock
test_class.original_string: @Mock
      ResourceManager _resourceMgr;
test_class.type: ResourceManager
test_class.var_name: _resourceMgr
test_class.declarator: _msServer
test_class.modifier: @Mock
test_class.original_string: @Mock
      ManagementServer _msServer;
test_class.type: ManagementServer
test_class.var_name: _msServer
test_class.declarator: _configDao
test_class.modifier: @Mock
test_class.original_string: @Mock
      ConfigurationDao _configDao;
test_class.type: ConfigurationDao
test_class.var_name: _configDao
test_class.declarator: volumeMgr
test_class.modifier: @Mock
test_class.original_string: @Mock
      VolumeOrchestrationService volumeMgr;
test_class.type: VolumeOrchestrationService
test_class.var_name: volumeMgr
test_class.declarator: hostVO
test_class.modifier: @Mock
test_class.original_string: @Mock
      HostVO hostVO;
test_class.type: HostVO
test_class.var_name: hostVO
test_class.declarator: zoneRepository
test_class.modifier: @Mock
test_class.original_string: @Mock
      ZoneRepository zoneRepository;
test_class.type: ZoneRepository
test_class.var_name: zoneRepository
test_class.declarator: highAvailabilityManager
test_class.original_string: HighAvailabilityManagerImpl highAvailabilityManager;
test_class.type: HighAvailabilityManagerImpl
test_class.var_name: highAvailabilityManager
test_class.declarator: highAvailabilityManagerSpy
test_class.original_string: HighAvailabilityManagerImpl highAvailabilityManagerSpy;
test_class.type: HighAvailabilityManagerImpl
test_class.var_name: highAvailabilityManagerSpy
test_class.file: cosmic-core/server/src/test/java/com/cloud/ha/HighAvailabilityManagerImplTest.java
test_class.identifier: HighAvailabilityManagerImplTest
test_case.body: @Test
      public void scheduleRestartForVmsOnHost() {
          Mockito.when(hostVO.getType()).thenReturn(HostType.Routing);
          Mockito.when(hostVO.getHypervisorType()).thenReturn(HypervisorType.KVM);
          Mockito.when(_instanceDao.listByHostId(42l)).thenReturn(Arrays.asList(Mockito.mock(VMInstanceVO.class)));
          Mockito.when(_podDao.findById(Mockito.anyLong())).thenReturn(Mockito.mock(HostPodVO.class));
          Mockito.when(zoneRepository.findById(Mockito.anyLong())).thenReturn(Optional.of(Mockito.mock(Zone.class)));
  
          highAvailabilityManager.scheduleRestartForVmsOnHost(hostVO, true);
      }
test_case.class_method_signature: HighAvailabilityManagerImplTest.scheduleRestartForVmsOnHost()
test_case.full_signature: @Test public void scheduleRestartForVmsOnHost()
test_case.identifier: scheduleRestartForVmsOnHost
test_case.invocations: thenReturn when getType thenReturn when getHypervisorType thenReturn when listByHostId asList mock thenReturn when findById anyLong mock thenReturn when findById anyLong of mock scheduleRestartForVmsOnHost
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void scheduleRestartForVmsOnHost()
focal_class.declarator: s_logger = LoggerFactory.getLogger(HighAvailabilityManagerImpl.class)
focal_class.modifier: protected static final
focal_class.original_string: protected static final Logger s_logger = LoggerFactory.getLogger(HighAvailabilityManagerImpl.class);
focal_class.type: Logger
focal_class.var_name: s_logger
focal_class.declarator: _workers
focal_class.original_string: WorkerThread[] _workers;
focal_class.type: WorkerThread[]
focal_class.var_name: _workers
focal_class.declarator: _stopped
focal_class.original_string: boolean _stopped;
focal_class.type: boolean
focal_class.var_name: _stopped
focal_class.declarator: _timeToSleep
focal_class.original_string: long _timeToSleep;
focal_class.type: long
focal_class.var_name: _timeToSleep
focal_class.declarator: _haDao
focal_class.modifier: @Inject
focal_class.original_string: @Inject
      HighAvailabilityDao _haDao;
focal_class.type: HighAvailabilityDao
focal_class.var_name: _haDao
focal_class.declarator: _instanceDao
focal_class.modifier: @Inject
focal_class.original_string: @Inject
      VMInstanceDao _instanceDao;
focal_class.type: VMInstanceDao
focal_class.var_name: _instanceDao
focal_class.declarator: _hostDao
focal_class.modifier: @Inject
focal_class.original_string: @Inject
      HostDao _hostDao;
focal_class.type: HostDao
focal_class.var_name: _hostDao
focal_class.declarator: _podDao
focal_class.modifier: @Inject
focal_class.original_string: @Inject
      HostPodDao _podDao;
focal_class.type: HostPodDao
focal_class.var_name: _podDao
focal_class.declarator: _managedContext
focal_class.modifier: @Inject
focal_class.original_string: @Inject
      ManagedContext _managedContext;
focal_class.type: ManagedContext
focal_class.var_name: _managedContext
focal_class.declarator: _alertMgr
focal_class.modifier: @Inject
focal_class.original_string: @Inject
      AlertManager _alertMgr;
focal_class.type: AlertManager
focal_class.var_name: _alertMgr
focal_class.declarator: _itMgr
focal_class.modifier: @Inject
focal_class.original_string: @Inject
      VirtualMachineManager _itMgr;
focal_class.type: VirtualMachineManager
focal_class.var_name: _itMgr
focal_class.declarator: _resourceMgr
focal_class.modifier: @Inject
focal_class.original_string: @Inject
      ResourceManager _resourceMgr;
focal_class.type: ResourceManager
focal_class.var_name: _resourceMgr
focal_class.declarator: _msServer
focal_class.modifier: @Inject
focal_class.original_string: @Inject
      ManagementServer _msServer;
focal_class.type: ManagementServer
focal_class.var_name: _msServer
focal_class.declarator: _configDao
focal_class.modifier: @Inject
focal_class.original_string: @Inject
      ConfigurationDao _configDao;
focal_class.type: ConfigurationDao
focal_class.var_name: _configDao
focal_class.declarator: volumeMgr
focal_class.modifier: @Inject
focal_class.original_string: @Inject
      VolumeOrchestrationService volumeMgr;
focal_class.type: VolumeOrchestrationService
focal_class.var_name: volumeMgr
focal_class.declarator: zoneRepository
focal_class.modifier: @Inject
focal_class.original_string: @Inject
      ZoneRepository zoneRepository;
focal_class.type: ZoneRepository
focal_class.var_name: zoneRepository
focal_class.declarator: investigators
focal_class.original_string: List<Investigator> investigators;
focal_class.type: List<Investigator>
focal_class.var_name: investigators
focal_class.declarator: fenceBuilders
focal_class.original_string: List<FenceBuilder> fenceBuilders;
focal_class.type: List<FenceBuilder>
focal_class.var_name: fenceBuilders
focal_class.declarator: _haPlanners
focal_class.original_string: List<HAPlanner> _haPlanners;
focal_class.type: List<HAPlanner>
focal_class.var_name: _haPlanners
focal_class.declarator: _serverId
focal_class.original_string: long _serverId;
focal_class.type: long
focal_class.var_name: _serverId
focal_class.declarator: _instance
focal_class.original_string: String _instance;
focal_class.type: String
focal_class.var_name: _instance
focal_class.declarator: _executor
focal_class.original_string: ScheduledExecutorService _executor;
focal_class.type: ScheduledExecutorService
focal_class.var_name: _executor
focal_class.declarator: _stopRetryInterval
focal_class.original_string: int _stopRetryInterval;
focal_class.type: int
focal_class.var_name: _stopRetryInterval
focal_class.declarator: _investigateRetryInterval
focal_class.original_string: int _investigateRetryInterval;
focal_class.type: int
focal_class.var_name: _investigateRetryInterval
focal_class.declarator: _migrateRetryInterval
focal_class.original_string: int _migrateRetryInterval;
focal_class.type: int
focal_class.var_name: _migrateRetryInterval
focal_class.declarator: _restartRetryInterval
focal_class.original_string: int _restartRetryInterval;
focal_class.type: int
focal_class.var_name: _restartRetryInterval
focal_class.declarator: _maxRetries
focal_class.original_string: int _maxRetries;
focal_class.type: int
focal_class.var_name: _maxRetries
focal_class.declarator: _timeBetweenFailures
focal_class.original_string: long _timeBetweenFailures;
focal_class.type: long
focal_class.var_name: _timeBetweenFailures
focal_class.declarator: _timeBetweenCleanups
focal_class.original_string: long _timeBetweenCleanups;
focal_class.type: long
focal_class.var_name: _timeBetweenCleanups
focal_class.declarator: _forceHA
focal_class.original_string: boolean _forceHA;
focal_class.type: boolean
focal_class.var_name: _forceHA
focal_class.declarator: _haTag = null
focal_class.original_string: String _haTag = null;
focal_class.type: String
focal_class.var_name: _haTag
focal_class.file: cosmic-core/server/src/main/java/com/cloud/ha/HighAvailabilityManagerImpl.java
focal_class.identifier: HighAvailabilityManagerImpl
focal_class.interfaces: implements HighAvailabilityManager, ClusterManagerListener
focal_class.class_method_signature: HighAvailabilityManagerImpl.HighAvailabilityManagerImpl()
focal_class.full_signature: protected  HighAvailabilityManagerImpl()
focal_class.identifier: HighAvailabilityManagerImpl
focal_class.modifiers: protected
focal_class.parameters: ()
focal_class.signature:  HighAvailabilityManagerImpl()
focal_class.class_method_signature: HighAvailabilityManagerImpl.getInvestigators()
focal_class.full_signature: public List<Investigator> getInvestigators()
focal_class.identifier: getInvestigators
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: List<Investigator>
focal_class.signature: List<Investigator> getInvestigators()
focal_class.class_method_signature: HighAvailabilityManagerImpl.setInvestigators(final List<Investigator> investigators)
focal_class.full_signature: public void setInvestigators(final List<Investigator> investigators)
focal_class.identifier: setInvestigators
focal_class.modifiers: public
focal_class.parameters: (final List<Investigator> investigators)
focal_class.return: void
focal_class.signature: void setInvestigators(final List<Investigator> investigators)
focal_class.class_method_signature: HighAvailabilityManagerImpl.getFenceBuilders()
focal_class.full_signature: public List<FenceBuilder> getFenceBuilders()
focal_class.identifier: getFenceBuilders
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: List<FenceBuilder>
focal_class.signature: List<FenceBuilder> getFenceBuilders()
focal_class.class_method_signature: HighAvailabilityManagerImpl.setFenceBuilders(final List<FenceBuilder> fenceBuilders)
focal_class.full_signature: public void setFenceBuilders(final List<FenceBuilder> fenceBuilders)
focal_class.identifier: setFenceBuilders
focal_class.modifiers: public
focal_class.parameters: (final List<FenceBuilder> fenceBuilders)
focal_class.return: void
focal_class.signature: void setFenceBuilders(final List<FenceBuilder> fenceBuilders)
focal_class.class_method_signature: HighAvailabilityManagerImpl.getHaPlanners()
focal_class.full_signature: public List<HAPlanner> getHaPlanners()
focal_class.identifier: getHaPlanners
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: List<HAPlanner>
focal_class.signature: List<HAPlanner> getHaPlanners()
focal_class.class_method_signature: HighAvailabilityManagerImpl.setHaPlanners(final List<HAPlanner> haPlanners)
focal_class.full_signature: public void setHaPlanners(final List<HAPlanner> haPlanners)
focal_class.identifier: setHaPlanners
focal_class.modifiers: public
focal_class.parameters: (final List<HAPlanner> haPlanners)
focal_class.return: void
focal_class.signature: void setHaPlanners(final List<HAPlanner> haPlanners)
focal_class.class_method_signature: HighAvailabilityManagerImpl.investigate(final long hostId)
focal_class.full_signature: @Override public HostStatus investigate(final long hostId)
focal_class.identifier: investigate
focal_class.modifiers: @Override public
focal_class.parameters: (final long hostId)
focal_class.return: HostStatus
focal_class.signature: HostStatus investigate(final long hostId)
focal_class.class_method_signature: HighAvailabilityManagerImpl.scheduleRestart(VMInstanceVO vm, final boolean investigate)
focal_class.full_signature: @Override public void scheduleRestart(VMInstanceVO vm, final boolean investigate)
focal_class.identifier: scheduleRestart
focal_class.modifiers: @Override public
focal_class.parameters: (VMInstanceVO vm, final boolean investigate)
focal_class.return: void
focal_class.signature: void scheduleRestart(VMInstanceVO vm, final boolean investigate)
focal_class.class_method_signature: HighAvailabilityManagerImpl.cancelDestroy(final VMInstanceVO vm, final Long hostId)
focal_class.full_signature: @Override public void cancelDestroy(final VMInstanceVO vm, final Long hostId)
focal_class.identifier: cancelDestroy
focal_class.modifiers: @Override public
focal_class.parameters: (final VMInstanceVO vm, final Long hostId)
focal_class.return: void
focal_class.signature: void cancelDestroy(final VMInstanceVO vm, final Long hostId)
focal_class.class_method_signature: HighAvailabilityManagerImpl.scheduleDestroy(final VMInstanceVO vm, final long hostId)
focal_class.full_signature: @Override public void scheduleDestroy(final VMInstanceVO vm, final long hostId)
focal_class.identifier: scheduleDestroy
focal_class.modifiers: @Override public
focal_class.parameters: (final VMInstanceVO vm, final long hostId)
focal_class.return: void
focal_class.signature: void scheduleDestroy(final VMInstanceVO vm, final long hostId)
focal_class.class_method_signature: HighAvailabilityManagerImpl.scheduleRestartForVmsOnHost(final HostVO host, final boolean investigate)
focal_class.full_signature: @Override public void scheduleRestartForVmsOnHost(final HostVO host, final boolean investigate)
focal_class.identifier: scheduleRestartForVmsOnHost
focal_class.modifiers: @Override public
focal_class.parameters: (final HostVO host, final boolean investigate)
focal_class.return: void
focal_class.signature: void scheduleRestartForVmsOnHost(final HostVO host, final boolean investigate)
focal_class.class_method_signature: HighAvailabilityManagerImpl.scheduleMigration(final VMInstanceVO vm)
focal_class.full_signature: @Override public boolean scheduleMigration(final VMInstanceVO vm)
focal_class.identifier: scheduleMigration
focal_class.modifiers: @Override public
focal_class.parameters: (final VMInstanceVO vm)
focal_class.return: boolean
focal_class.signature: boolean scheduleMigration(final VMInstanceVO vm)
focal_class.class_method_signature: HighAvailabilityManagerImpl.findTakenMigrationWork()
focal_class.full_signature: @Override public List<VMInstanceVO> findTakenMigrationWork()
focal_class.identifier: findTakenMigrationWork
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: List<VMInstanceVO>
focal_class.signature: List<VMInstanceVO> findTakenMigrationWork()
focal_class.class_method_signature: HighAvailabilityManagerImpl.scheduleStop(final VMInstanceVO vm, final long hostId, final HaWork.HaWorkType type)
focal_class.full_signature: @Override public void scheduleStop(final VMInstanceVO vm, final long hostId, final HaWork.HaWorkType type)
focal_class.identifier: scheduleStop
focal_class.modifiers: @Override public
focal_class.parameters: (final VMInstanceVO vm, final long hostId, final HaWork.HaWorkType type)
focal_class.return: void
focal_class.signature: void scheduleStop(final VMInstanceVO vm, final long hostId, final HaWork.HaWorkType type)
focal_class.class_method_signature: HighAvailabilityManagerImpl.cancelScheduledMigrations(final HostVO host)
focal_class.full_signature: @Override public void cancelScheduledMigrations(final HostVO host)
focal_class.identifier: cancelScheduledMigrations
focal_class.modifiers: @Override public
focal_class.parameters: (final HostVO host)
focal_class.return: void
focal_class.signature: void cancelScheduledMigrations(final HostVO host)
focal_class.class_method_signature: HighAvailabilityManagerImpl.hasPendingHaWork(final long vmId)
focal_class.full_signature: @Override public boolean hasPendingHaWork(final long vmId)
focal_class.identifier: hasPendingHaWork
focal_class.modifiers: @Override public
focal_class.parameters: (final long vmId)
focal_class.return: boolean
focal_class.signature: boolean hasPendingHaWork(final long vmId)
focal_class.class_method_signature: HighAvailabilityManagerImpl.getHaTag()
focal_class.full_signature: @Override public String getHaTag()
focal_class.identifier: getHaTag
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getHaTag()
focal_class.class_method_signature: HighAvailabilityManagerImpl.getHAPlanner()
focal_class.full_signature: @Override public DeploymentPlanner getHAPlanner()
focal_class.identifier: getHAPlanner
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: DeploymentPlanner
focal_class.signature: DeploymentPlanner getHAPlanner()
focal_class.class_method_signature: HighAvailabilityManagerImpl.wakeupWorkers()
focal_class.full_signature: protected void wakeupWorkers()
focal_class.identifier: wakeupWorkers
focal_class.modifiers: protected
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void wakeupWorkers()
focal_class.class_method_signature: HighAvailabilityManagerImpl.processWork(final HaWorkVO work)
focal_class.full_signature: private void processWork(final HaWorkVO work)
focal_class.identifier: processWork
focal_class.modifiers: private
focal_class.parameters: (final HaWorkVO work)
focal_class.return: void
focal_class.signature: void processWork(final HaWorkVO work)
focal_class.class_method_signature: HighAvailabilityManagerImpl.migrate(final HaWorkVO work)
focal_class.full_signature: public Long migrate(final HaWorkVO work)
focal_class.identifier: migrate
focal_class.modifiers: public
focal_class.parameters: (final HaWorkVO work)
focal_class.return: Long
focal_class.signature: Long migrate(final HaWorkVO work)
focal_class.class_method_signature: HighAvailabilityManagerImpl.restart(final HaWorkVO work)
focal_class.full_signature: protected Long restart(final HaWorkVO work)
focal_class.identifier: restart
focal_class.modifiers: protected
focal_class.parameters: (final HaWorkVO work)
focal_class.return: Long
focal_class.signature: Long restart(final HaWorkVO work)
focal_class.class_method_signature: HighAvailabilityManagerImpl.stopVM(final HaWorkVO work)
focal_class.full_signature: protected Long stopVM(final HaWorkVO work)
focal_class.identifier: stopVM
focal_class.modifiers: protected
focal_class.parameters: (final HaWorkVO work)
focal_class.return: Long
focal_class.signature: Long stopVM(final HaWorkVO work)
focal_class.class_method_signature: HighAvailabilityManagerImpl.destroyVM(final HaWorkVO work)
focal_class.full_signature: protected Long destroyVM(final HaWorkVO work)
focal_class.identifier: destroyVM
focal_class.modifiers: protected
focal_class.parameters: (final HaWorkVO work)
focal_class.return: Long
focal_class.signature: Long destroyVM(final HaWorkVO work)
focal_class.class_method_signature: HighAvailabilityManagerImpl.rescheduleWork(final HaWorkVO work, final long nextTime)
focal_class.full_signature: private void rescheduleWork(final HaWorkVO work, final long nextTime)
focal_class.identifier: rescheduleWork
focal_class.modifiers: private
focal_class.parameters: (final HaWorkVO work, final long nextTime)
focal_class.return: void
focal_class.signature: void rescheduleWork(final HaWorkVO work, final long nextTime)
focal_class.class_method_signature: HighAvailabilityManagerImpl.getRescheduleTime(final HaWork.HaWorkType workType)
focal_class.full_signature: private long getRescheduleTime(final HaWork.HaWorkType workType)
focal_class.identifier: getRescheduleTime
focal_class.modifiers: private
focal_class.parameters: (final HaWork.HaWorkType workType)
focal_class.return: long
focal_class.signature: long getRescheduleTime(final HaWork.HaWorkType workType)
focal_class.class_method_signature: HighAvailabilityManagerImpl.configure(final String name, final Map<String, Object> xmlParams)
focal_class.full_signature: @Override public boolean configure(final String name, final Map<String, Object> xmlParams)
focal_class.identifier: configure
focal_class.modifiers: @Override public
focal_class.parameters: (final String name, final Map<String, Object> xmlParams)
focal_class.return: boolean
focal_class.signature: boolean configure(final String name, final Map<String, Object> xmlParams)
focal_class.class_method_signature: HighAvailabilityManagerImpl.start()
focal_class.full_signature: @Override public boolean start()
focal_class.identifier: start
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean start()
focal_class.class_method_signature: HighAvailabilityManagerImpl.stop()
focal_class.full_signature: @Override public boolean stop()
focal_class.identifier: stop
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean stop()
focal_class.class_method_signature: HighAvailabilityManagerImpl.onManagementNodeJoined(final List<? extends ManagementServerHost> nodeList, final long selfNodeId)
focal_class.full_signature: @Override public void onManagementNodeJoined(final List<? extends ManagementServerHost> nodeList, final long selfNodeId)
focal_class.identifier: onManagementNodeJoined
focal_class.modifiers: @Override public
focal_class.parameters: (final List<? extends ManagementServerHost> nodeList, final long selfNodeId)
focal_class.return: void
focal_class.signature: void onManagementNodeJoined(final List<? extends ManagementServerHost> nodeList, final long selfNodeId)
focal_class.class_method_signature: HighAvailabilityManagerImpl.onManagementNodeLeft(final List<? extends ManagementServerHost> nodeList, final long selfNodeId)
focal_class.full_signature: @Override public void onManagementNodeLeft(final List<? extends ManagementServerHost> nodeList, final long selfNodeId)
focal_class.identifier: onManagementNodeLeft
focal_class.modifiers: @Override public
focal_class.parameters: (final List<? extends ManagementServerHost> nodeList, final long selfNodeId)
focal_class.return: void
focal_class.signature: void onManagementNodeLeft(final List<? extends ManagementServerHost> nodeList, final long selfNodeId)
focal_class.class_method_signature: HighAvailabilityManagerImpl.onManagementNodeIsolated()
focal_class.full_signature: @Override public void onManagementNodeIsolated()
focal_class.identifier: onManagementNodeIsolated
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void onManagementNodeIsolated()
focal_class.superclass: extends ManagerBase
focal_method.body: @Override
      public void scheduleRestartForVmsOnHost(final HostVO host, final boolean investigate) {
  
          if (host.getType() != HostType.Routing) {
              return;
          }
  
          s_logger.warn("Scheduling restart for VMs on host " + host.getId() + "-" + host.getName());
  
          final List<VMInstanceVO> vms = _instanceDao.listByHostId(host.getId());
          final Zone zone = zoneRepository.findById(host.getDataCenterId()).orElse(null);
  
          // send an email alert that the host is down
          StringBuilder sb = null;
          final List<VMInstanceVO> reorderedVMList = new ArrayList<>();
          if (vms != null && !vms.isEmpty()) {
              sb = new StringBuilder();
              sb.append("  Starting HA on the following VMs:");
              // collect list of vm names for the alert email
              for (int i = 0; i < vms.size(); i++) {
                  final VMInstanceVO vm = vms.get(i);
                  if (vm.getType() == VirtualMachineType.User) {
                      reorderedVMList.add(vm);
                  } else {
                      reorderedVMList.add(0, vm);
                  }
                  if (vm.isHaEnabled()) {
                      sb.append(" " + vm.getHostName());
                  }
              }
          }
  
          // send an email alert that the host is down, include VMs
          final HostPodVO podVO = _podDao.findById(host.getPodId());
          final String hostDesc = "name: " + host.getName() + " (id:" + host.getId() + "), availability zone: " + zone.getName() + ", pod: " + podVO.getName();
          _alertMgr.sendAlert(AlertManager.AlertType.ALERT_TYPE_HOST, host.getDataCenterId(), host.getPodId(), "Host is down, " + hostDesc,
                  "Host [" + hostDesc + "] is down." + (sb != null ? sb.toString() : ""));
  
          for (VMInstanceVO vm : reorderedVMList) {
              if (s_logger.isDebugEnabled()) {
                  s_logger.debug("Notifying HA Mgr of to restart vm " + vm.getId() + "-" + vm.getInstanceName());
              }
              vm = _instanceDao.findByUuid(vm.getUuid());
              final Long hostId = vm.getHostId();
              if (hostId != null && !hostId.equals(host.getId())) {
                  s_logger.debug("VM " + vm.getInstanceName() + " is not on down host " + host.getId() + " it is on other host "
                          + hostId + " VM HA is done");
                  continue;
              }
              scheduleRestart(vm, investigate);
          }
      }
focal_method.class_method_signature: HighAvailabilityManagerImpl.scheduleRestartForVmsOnHost(final HostVO host, final boolean investigate)
focal_method.full_signature: @Override public void scheduleRestartForVmsOnHost(final HostVO host, final boolean investigate)
focal_method.identifier: scheduleRestartForVmsOnHost
focal_method.invocations: getType warn getId getName listByHostId getId orElse findById getDataCenterId isEmpty append size get getType add add isHaEnabled append getHostName findById getPodId getName getId getName getName sendAlert getDataCenterId getPodId toString isDebugEnabled debug getId getInstanceName findByUuid getUuid getHostId equals getId debug getInstanceName getId scheduleRestart
focal_method.modifiers: @Override public
focal_method.parameters: (final HostVO host, final boolean investigate)
focal_method.return: void
focal_method.signature: void scheduleRestartForVmsOnHost(final HostVO host, final boolean investigate)