Class CloudAgentsIdleHealthReport
- java.lang.Object
 - 
- jetbrains.buildServer.serverSide.healthStatus.HealthStatusReport
 - 
- jetbrains.buildServer.clouds.server.serverHealth.CloudAgentsIdleHealthReport
 
 
 
- 
- All Implemented Interfaces:
 ServerExtension,TeamCityExtension
public class CloudAgentsIdleHealthReport extends HealthStatusReport
- Author:
 - Sergey.Pak Date: 8/20/13 Time: 7:46 PM
 
 
- 
- 
Field Summary
Fields Modifier and Type Field Description static StringCANT_STOP_AGENT_CATEGORY_IDstatic StringCANT_STOP_CATEGORY_DESCRIPTIONstatic StringCANT_STOP_CATEGORY_NAMEstatic StringCLOUD_AGENTS_REPORT_TYPEstatic StringIDLE_AGENT_CATEGORY_IDstatic StringIDLE_CATEGORY_DESCRIPTIONstatic StringIDLE_CATEGORY_NAMEstatic intSHUTDOWN_HANDICAP 
- 
Constructor Summary
Constructors Constructor Description CloudAgentsIdleHealthReport(BuildAgentManagerEx agentManager, CloudEventDispatcher dispatcher, ProjectManager projectManager, CloudManager cm) 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanReportItemsFor(HealthStatusScope scope)Check whether the report can produce any items accepted by the specified scope.Collection<ItemCategory>getCategories()Problems categories producing by this problem finder.StringgetDisplayName()User presentable name of the problem finder.StringgetType()voidreport(HealthStatusScope scope, HealthStatusItemConsumer resultConsumer)When called must report all found problems to result consumer according to the received scope.- 
Methods inherited from class jetbrains.buildServer.serverSide.healthStatus.HealthStatusReport
equals, hashCode 
 - 
 
 - 
 
- 
- 
Field Detail
- 
CLOUD_AGENTS_REPORT_TYPE
public static final String CLOUD_AGENTS_REPORT_TYPE
- See Also:
 - Constant Field Values
 
 
- 
IDLE_AGENT_CATEGORY_ID
public static final String IDLE_AGENT_CATEGORY_ID
- See Also:
 - Constant Field Values
 
 
- 
CANT_STOP_AGENT_CATEGORY_ID
public static final String CANT_STOP_AGENT_CATEGORY_ID
- See Also:
 - Constant Field Values
 
 
- 
CANT_STOP_CATEGORY_NAME
public static final String CANT_STOP_CATEGORY_NAME
- See Also:
 - Constant Field Values
 
 
- 
CANT_STOP_CATEGORY_DESCRIPTION
public static final String CANT_STOP_CATEGORY_DESCRIPTION
- See Also:
 - Constant Field Values
 
 
- 
IDLE_CATEGORY_NAME
public static final String IDLE_CATEGORY_NAME
- See Also:
 - Constant Field Values
 
 
- 
IDLE_CATEGORY_DESCRIPTION
public static final String IDLE_CATEGORY_DESCRIPTION
- See Also:
 - Constant Field Values
 
 
- 
SHUTDOWN_HANDICAP
public static final int SHUTDOWN_HANDICAP
- See Also:
 - Constant Field Values
 
 
 - 
 
- 
Constructor Detail
- 
CloudAgentsIdleHealthReport
public CloudAgentsIdleHealthReport(@NotNull BuildAgentManagerEx agentManager, @NotNull CloudEventDispatcher dispatcher, @NotNull ProjectManager projectManager, @NotNull CloudManager cm) 
 - 
 
- 
Method Detail
- 
getType
@NotNull public String getType()
- Specified by:
 getTypein classHealthStatusReport- Returns:
 - unique identifier of the problem finder
 
 
- 
getDisplayName
@NotNull public String getDisplayName()
Description copied from class:HealthStatusReportUser presentable name of the problem finder.- Specified by:
 getDisplayNamein classHealthStatusReport- Returns:
 - name of the problem finder to show in the user interface.
 
 
- 
getCategories
@NotNull public Collection<ItemCategory> getCategories()
Description copied from class:HealthStatusReportProblems categories producing by this problem finder. All problems of 'undeclared' categories will be filtered even if they were consumed.- Specified by:
 getCategoriesin classHealthStatusReport- Returns:
 - Unmodifiable not-empty collection of unique categories producing by this problem finder.
 
 
- 
canReportItemsFor
public boolean canReportItemsFor(HealthStatusScope scope)
Description copied from class:HealthStatusReportCheck whether the report can produce any items accepted by the specified scope.HealthStatusReport.report(HealthStatusScope, HealthStatusItemConsumer)will not be called if this method return false. Implementations should not perform any complex calculations, they are expected to quickly analyzeHealthStatusScopeand return false if it is clear that they can not report any acceptable items. For example, they can return false if they can't produce items with the requested severity (that is accepted byHealthStatusScope.isItemWithSeverityAccepted(ItemSeverity)).- Specified by:
 canReportItemsForin classHealthStatusReport
 
- 
report
public void report(@NotNull HealthStatusScope scope, @NotNull HealthStatusItemConsumer resultConsumer)Description copied from class:HealthStatusReportWhen called must report all found problems to result consumer according to the received scope. Always called with system privileges (in all permissions mode) so no permission checks are required. Note that this method can be called quite often, so long-running implementations should return false fromHealthStatusReport.canReportItemsFor(HealthStatusScope)if it's clear that they can't produce any items for the requested scope. Implementations of this method should always return in a reasonable time. For example, long running computations or network calls should not be made in this method, but rather called in some background thread, their result saved to a cache, and then be read from the cache in this method.- Specified by:
 reportin classHealthStatusReport- Parameters:
 scope- health status coderesultConsumer- health status item consumer
 
 - 
 
 -