Freigeben über


ActorRemotingExceptionHandler Klasse

public class ActorRemotingExceptionHandler extends ServiceRemotingExceptionHandler

Diese Klasse bietet die Behandlung von Ausnahmen, die bei der Kommunikation mit Service Fabric-Akteuren über Remoteinterfaces auftreten.

Bemerkungen: Dieser Ausnahmehandler behandelt Ausnahmen im Zusammenhang mit den folgenden Szenarien:

    <li>
    
      <p>&lt;cite&gt;Duplicate Messages:&lt;/cite&gt; </p>
    
      <p>Operations performed on the actor are retried from the client based on the exception handling logic. These exceptions represent various error condition including service failover. Therefore it is possible for the actors to receive duplicate messages. If a duplicate message is received while previous message is being processed by the actor, runtime return an internal exception to the client. The client then retries the operation to get the result back from the actor. From the actor's perspective duplicate operation will be performed by the clients and it should handle it in the similar manner as if the operation was already processed and then a duplicate message arrived. </p>
    
      <p></p>
    
      <p></p>
    
    </li>
    
    <li>
    
      <p>&lt;cite&gt;<xref uid="microsoft.servicefabric.actors.ActorConcurrencyLockTimeoutException" data-throw-if-not-resolved="false" data-raw-source="ActorConcurrencyLockTimeoutException"></xref>:&lt;/cite&gt; </p>
    
      <p>Operations on the actors are performed using a turn based concurrency lock ( <xref uid="" data-throw-if-not-resolved="false" data-raw-source="ActorConcurrencySettings"></xref>) that supports logical call context based reentrancy. In case of the long running actor operations it is possible for acquisition of this lock to time out. The acquisition of the lock can also time out in case of the deadlock situations (actor A and actor B calling each other almost at the same time). </p>
    
      <p></p>
    
      <p>The exception related to concurrency lock timeout is handled by returning <xref uid="" data-throw-if-not-resolved="false" data-raw-source="ExceptionHandlingRetryResult"></xref> from the <xref uid="microsoft.servicefabric.services.communication.client.ExceptionHandler.handleException(ExceptionInformation,OperationRetrySettings)" data-throw-if-not-resolved="false" data-raw-source="ExceptionHandler#handleException(ExceptionInformation, OperationRetrySettings)"></xref> method if the client performing the operation is not another actor. The <xref uid="" data-throw-if-not-resolved="false" data-raw-source="ExceptionHandlingRetryResult#isTransient"></xref> property of the <xref uid="" data-throw-if-not-resolved="false" data-raw-source="ExceptionHandlingRetryResult"></xref> is set to true, the <xref uid="" data-throw-if-not-resolved="false" data-raw-source="ExceptionHandlingRetryResult"></xref>'s retryDelay property is set to a random value up to <xref uid="" data-throw-if-not-resolved="false" data-raw-source="OperationRetrySettings"></xref>'s MaxRetryBackoffIntervalOnTransientErrors and <xref uid="" data-throw-if-not-resolved="false" data-raw-source="ExceptionHandlingRetryResult"></xref>'s MaxRetryCount property is set to <xref uid="" data-throw-if-not-resolved="false" data-raw-source="Integer#MAX_VALUE"></xref>. </p>
    
      <p></p>
    
      <p>The exception related to concurrency lock timeout is handled by returning <xref uid="" data-throw-if-not-resolved="false" data-raw-source="ExceptionHandlingThrowResult"></xref> from the <xref uid="microsoft.servicefabric.services.communication.client.ExceptionHandler.handleException(ExceptionInformation,OperationRetrySettings)" data-throw-if-not-resolved="false" data-raw-source="ExceptionHandler#handleException(ExceptionInformation, OperationRetrySettings)"></xref> method, if the client performing the operation is another actor. In the deadlock situations this allows the call chain to unwind all the way back to the original client and the operation is then retried from there. </p>
    
      <p></p>
    
    </li>
    

Zusammenfassung zum Konstruktor

Konstruktor Beschreibung
ActorRemotingExceptionHandler(String traceId)

Erstellt einen ActorRemotingExceptionHandler mit einer angegebenen Ablaufverfolgungs-ID.

Methodenzusammenfassung

Modifizierer und Typ Methode und Beschreibung
ExceptionHandlingResult handleException(ExceptionInformation exceptionInformation, OperationRetrySettings retrySettings)

Methode, die die Ausnahme untersucht und bestimmt, wie diese Ausnahme behandelt werden kann.

Geerbte Elemente

Details zum Konstruktor

ActorRemotingExceptionHandler

public ActorRemotingExceptionHandler(String traceId)

Erstellt einen ActorRemotingExceptionHandler mit einer angegebenen Ablaufverfolgungs-ID.

Parameter:

traceId - Id, die in Diagnose Ablaufverfolgungen dieser Komponente verwendet werden soll.

Details zur Methode

handleException

public ExceptionHandlingResult handleException(ExceptionInformation exceptionInformation, OperationRetrySettings retrySettings)

Methode, die die Ausnahme untersucht und bestimmt, wie diese Ausnahme behandelt werden kann.

Überschreibt:

ActorRemotingExceptionHandler.handleException(ExceptionInformation exceptionInformation, OperationRetrySettings retrySettings)

Parameter:

exceptionInformation - Informationen zur Ausnahme.
retrySettings - Der Vorgang wiederholt einstellungen.

Gibt zurück:

Ergebnis der Ausnahmebehandlung.

Gilt für: