azure-docs-sdk-java/docs-ref-autogen/system.fabric.FaultType.yml

54 строки
5.4 KiB
YAML

### YamlMime:JavaEnum
fields:
- fullName: system.fabric.FaultType.Invalid
name: Invalid
nameWithType: FaultType.Invalid
summary: <p>The type is invalid. </p>
uid: system.fabric.FaultType.Invalid
- fullName: system.fabric.FaultType.Permanent
name: Permanent
nameWithType: FaultType.Permanent
summary: >-
<p>A permanent fault is a fault that the replica cannot recover from. This type of fault indicates that the replica can make no further progress and should be removed and replaced. </p>
<p>
<b>Remarks : </b> An example of a permanent fault would be a persistent stateful service that tries to write information to disk and determines that the disk had been removed or was unusable. Calling <xref uid="system.fabric.ServicePartition.reportFault(FaultType)" data-throw-if-not-resolved="false" data-raw-source="system.fabric.ServicePartition#reportFault(system.fabric.FaultType)"></xref> and reporting a permanent fault result in the service to be Aborted via StatefulServiceReplica <xref uid="system.fabric.StatefulServiceReplica.abort()" data-throw-if-not-resolved="false" data-raw-source="system.fabric.StatefulServiceReplica#abort()"></xref> or StatelessServiceInstance <xref uid="system.fabric.StatelessServiceInstance.abort()" data-throw-if-not-resolved="false" data-raw-source="system.fabric.StatelessServiceInstance#abort()"></xref> without a chance to gracefully clean up state or complete operations. Therefore, if any cleanup or other long-running work is necessary, it should be performed before <xref uid="system.fabric.ServicePartition.reportFault(FaultType)" data-throw-if-not-resolved="false" data-raw-source="system.fabric.ServicePartition#reportFault(system.fabric.FaultType)"></xref> is called. Note that the distinction between permanent and transient faults is useful mainly for persistent stateful services. Other than the call sequence, the effects on other service types are the same: the replica or instance is removed, all state at that replica or instance is lost, and the replica or instance is recreated, potentially in a different location. </p>
uid: system.fabric.FaultType.Permanent
- fullName: system.fabric.FaultType.Transient
name: Transient
nameWithType: FaultType.Transient
summary: >-
<p>A transient fault indicates that there is some temporary condition which prevents the replica from making further progress or from processing further user requests. </p>
<p>
<b> Remarks : </b> An example of a transient fault is a service that determines that a portion of its state or some reference file is corrupted, but can be repaired if the service were to be re-initialized. In this case, the service uses the <xref uid="system.fabric.ServicePartition.reportFault(FaultType)" data-throw-if-not-resolved="false" data-raw-source="system.fabric.ServicePartition#reportFault(system.fabric.FaultType)"></xref> method to report a transient fault. Reporting a transient fault closes the service via StatefulServiceReplica. <xref uid="system.fabric.StatefulServiceReplica.closeAsync(CancellationToken)" data-throw-if-not-resolved="false" data-raw-source="system.fabric.StatefulServiceReplica#closeAsync(system.fabric.CancellationToken)"></xref> or StatelessServiceInstance <xref uid="system.fabric.StatelessServiceInstance.closeAsync(CancellationToken)" data-throw-if-not-resolved="false" data-raw-source="system.fabric.StatelessServiceInstance#closeAsync(system.fabric.CancellationToken)"></xref>. Note that for stateless and stateful services, volatile transient faults are not very useful because state is not preserved across the failure. For these services, whether to use transient or permanent faults is dependent on whether the service should be gracefully closed asynchronously with cleanup or ungracefully closed with a synchronous StatefulServiceReplica <xref uid="system.fabric.StatefulServiceReplica.abort()" data-throw-if-not-resolved="false" data-raw-source="system.fabric.StatefulServiceReplica#abort()"></xref> or StatelessServiceInstance <xref uid="system.fabric.StatelessServiceInstance.abort()" data-throw-if-not-resolved="false" data-raw-source="system.fabric.StatelessServiceInstance#abort()"></xref> method.</p>
uid: system.fabric.FaultType.Transient
inheritances:
- <xref href="java.lang.Object" data-throw-if-not-resolved="False"/>
- <xref href="java.lang.Enum&lt;FaultType&gt;" data-throw-if-not-resolved="False"/>
methods:
- fullName: system.fabric.FaultType.getValue()
name: getValue()
nameWithType: FaultType.getValue()
returns:
description: <p>Returns an integer representing <xref uid="" data-throw-if-not-resolved="false" data-raw-source="system.fabric.FaultType"></xref></p>
type: <xref href="int?alt=int&text=int" data-throw-if-not-resolved="False"/>
summary: <p>Gets the <xref uid="" data-throw-if-not-resolved="false" data-raw-source="system.fabric.FaultType"></xref> value. </p>
syntax: public int getValue()
uid: system.fabric.FaultType.getValue()
nameWithType: FaultType
syntax: public enum FaultType
uid: system.fabric.FaultType
fullName: system.fabric.FaultType
name: FaultType
package: system.fabric
summary: >-
<p>Indicates the type of fault that a service reports: invalid, transient or permanent. </p>
<p>
<b>Remarks : </b> Services can report faults during runtime by using the <xref uid="system.fabric.ServicePartition.reportFault(FaultType)" data-throw-if-not-resolved="false" data-raw-source="system.fabric.ServicePartition#reportFault(FaultType)"></xref> method to indicate the type of fault. </p>
metadata: {}