HealthInformation.setSequenceNumber(long sequenceNumber) 方法

定义

Sets the sequence number associated with the report. Must be greater than system.fabric.health.HealthInformation#unknownSequenceNumber.

Remarks:The report sequence number is used by health store to detect stale reports. Most of the times, the reporter doesn't need to specify the sequence number. The default value AutoSequenceNumber can be used instead. When a health client receives a report with Auto sequence number, it replaces the auto sequence number with a valid sequence number. The sequence number is guaranteed to increase in the same process, even if the client machine time goes backwards.

public void setSequenceNumber(long sequenceNumber)

参数

sequenceNumber
long

A long representing the report sequence number.

例外

IllegalArgumentException

if sequenceNumber is less or equals than unknownSequenceNumber

适用于