org.apache.sling.hc.annotations

## Annotation Type SlingHealthCheck

    @Target(value=TYPE)
     @Retention(value=CLASS)
    public @interface SlingHealthCheck

### Optional Element Summary

Optional Elements
`String` `asyncCronExpression` Cron expression for asynchronous execution (optional, default is synchronous execution).
`String` `componentName` Defines the Component name also used as the PID for the Configuration Admin Service.
`boolean` `configurationFactory` Set the metatype factory pid property (only for non factory components).
`org.apache.felix.scr.annotations.ConfigurationPolicy` `configurationPolicy` The component configuration policy
`String` `description` This is generally used as a description for the object described by the meta type.
`boolean` `generateComponent` Whether to generate a default SCR component tag.
`boolean` `generateService` Whether to generate a default SCR service tag with "interface=org.apache.sling.hc.api.HealthCheck".
`boolean` `immediate` Whether immediate is set on the SCR component.
`String` `label` This is generally used as a title for the object described by the meta type.
`String` `mbeanName` The JMX mbean name (optional, the mbean is only registered if attribute present).
`boolean` `metatype` Whether Metatype Service data is generated or not.
`String` `name` Defines the name of the health check.
`long` `resultCacheTtlInMs` Overrides the global result TTL as configured in `org.apache.sling.hc.core.impl.executor.HealthCheckExecutorImpl` for this individual check.
`String[]` `tags` One ore more tags.
`long` `warningsStickForMinutes` If given, warning results (that is WARN, CRITICAL or HEALTH_CHECK_ERROR) from the past executions will be taken into account as well for the given minutes (use Integer.MAX_VALUE for indefinitely).

### Element Detail

#### name

    public abstract String name

Defines the name of the health check.

This attribute is converted to values for the `hc.name` property.

Default:
  ""

#### tags

    public abstract String[] tags

One ore more tags.

This attribute is converted to values for the `hc.tags` property.

Default:
  {}

#### mbeanName

    public abstract String mbeanName

The JMX mbean name (optional, the mbean is only registered if attribute present).

This attribute is converted to values for the `hc.mbean.name` property.

Default:
  ""

#### asyncCronExpression

    public abstract String asyncCronExpression

Cron expression for asynchronous execution (optional, default is synchronous execution).

This attribute is converted to values for the `hc.async.cronExpression` property.

Default:
  ""

#### resultCacheTtlInMs

    public abstract long resultCacheTtlInMs

Overrides the global result TTL as configured in `org.apache.sling.hc.core.impl.executor.HealthCheckExecutorImpl` for this individual check.

The value of this property must be of type `Long` and is configured in ms.

Default:
  -1L

#### warningsStickForMinutes

    public abstract long warningsStickForMinutes

If given, warning results (that is WARN, CRITICAL or HEALTH_CHECK_ERROR) from the past executions will be taken into account as well for the given minutes (use Integer.MAX_VALUE for indefinitely). Useful for unhealthy system states that disappear but might leave the system at an inconsistent state (e.g. an event queue overflow).

Default:
  -1L

#### generateComponent

    public abstract boolean generateComponent

Whether to generate a default SCR component tag. If set to false, a `Component` annotation can be added manually with defined whatever configuration needed.

Default:
  true

#### generateService

    public abstract boolean generateService

Whether to generate a default SCR service tag with "interface=org.apache.sling.hc.api.HealthCheck". If set to false, a `Service` annotation can be added manually with defined whatever configuration needed.

Default:
  true

#### componentName

    public abstract String componentName

Defines the Component name also used as the PID for the Configuration Admin Service. Default value: Fully qualified name of the Java class.

Default:
  ""

#### metatype

    public abstract boolean metatype

Whether Metatype Service data is generated or not. If this parameter is set to true Metatype Service data is generated in the `metatype.xml` file for this component. Otherwise no Metatype Service data is generated for this component.

Default:
  true

#### immediate

    public abstract boolean immediate

Whether immediate is set on the SCR component.

Default:
  false

#### configurationFactory

    public abstract boolean configurationFactory

Set the metatype factory pid property (only for non factory components).

Default:
  false

#### configurationPolicy

    public abstract org.apache.felix.scr.annotations.ConfigurationPolicy configurationPolicy

The component configuration policy

Default:
  org.apache.felix.scr.annotations.ConfigurationPolicy.OPTIONAL

#### label

    public abstract String label

This is generally used as a title for the object described by the meta type. This name may be localized by prepending a % sign to the name. Default value: %<name>.name

Default:
  ""

#### description

    public abstract String description

This is generally used as a description for the object described by the meta type. This name may be localized by prepending a % sign to the name. Default value: %<name>.description

Default:
  ""