Class HealthCheckTemplate
- java.lang.Object
-
- com.atlassian.confluence.impl.health.AbstractHealthCheck
-
- com.atlassian.confluence.impl.health.HealthCheckTemplate
-
- All Implemented Interfaces:
HealthCheck
- Direct Known Subclasses:
AttachmentDataFileStoreCheck
,DatabaseCollationHealthCheck
,DatabaseSetupHealthCheck
,DbConnectionHealthCheck
,HomeHealthCheck
,HttpThreadsVsDbConnectionsHealthCheck
,LicenseValidationHealthCheck
,MSSQLDriverMigrationHealthCheck
,MySqlJdbcUrlHealthCheck
,OperatingSystemFreeMemoryHealthCheck
public abstract class HealthCheckTemplate extends AbstractHealthCheck
Simplies the implementation ofHealthCheck
s.- Since:
- 6.6.0
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
HealthCheckTemplate(Iterable<HealthCheck> prerequisites)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract List<HealthCheckResult>
doPerform()
Subclasses should perform their check and return any results arising from it.protected abstract Set<LifecyclePhase>
getApplicablePhases()
Subclasses should indicate the phases in which this check should run.boolean
isApplicableFor(LifecyclePhase phase)
Checks if current HealthCheck is applicable for given phaseList<HealthCheckResult>
perform(LifecyclePhase phase)
Performs health check for given phase.-
Methods inherited from class com.atlassian.confluence.impl.health.AbstractHealthCheck
getPrerequisites
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.atlassian.confluence.internal.health.HealthCheck
getId
-
-
-
-
Constructor Detail
-
HealthCheckTemplate
protected HealthCheckTemplate(Iterable<HealthCheck> prerequisites)
-
-
Method Detail
-
perform
public final List<HealthCheckResult> perform(LifecyclePhase phase)
Description copied from interface:HealthCheck
Performs health check for given phase.If the health check passes, an empty list will be returned.
- Returns:
- a collection of
HealthCheckResult
-
isApplicableFor
public final boolean isApplicableFor(LifecyclePhase phase)
Description copied from interface:HealthCheck
Checks if current HealthCheck is applicable for given phase- Returns:
- true if HealthCheck is applicable for the phase
-
getApplicablePhases
protected abstract Set<LifecyclePhase> getApplicablePhases()
Subclasses should indicate the phases in which this check should run.- Returns:
- the applicable phases
-
doPerform
protected abstract List<HealthCheckResult> doPerform()
Subclasses should perform their check and return any results arising from it. This method will only be called in a phase to which this check applies.- Returns:
- any results arising from this check
- See Also:
getApplicablePhases()
,HealthCheck.perform(LifecyclePhase)
-
-