共用方式為


HealthInformation.TimeToLive Property

 

Applies To: Azure, Windows 10, Windows 8, Windows 8.1, Windows Server 2012 R2

Gets or sets how long the health report is valid. Must be larger than TimeSpan.Zero.

Namespace:   System.Fabric.Health
Assembly:  System.Fabric (in System.Fabric.dll)

Syntax

public TimeSpan TimeToLive { get; set; }

Property Value

Type: System.TimeSpan

A TimeSpan representing the time to live of the health report.

Exceptions

Exception Condition
ArgumentException

The specified value was invalid. Please provide a duration that is larger than 0.

Remarks

When clients report periodically, they should send reports with higher frequency than time to live. If clients report on transition, they can set the time to live to infinite.

When time to live expires, the health event that contains the health information is either removed from health store, if RemoveWhenExpired is true or evaluated at error, if RemoveWhenExpired is false.

See Also

HealthInformation Class
System.Fabric.Health Namespace

Return to top