ActorRemotingExceptionHandler Classe
- java.
lang. Object - ExceptionHandler
- ServiceRemotingExceptionHandler
- microsoft.
servicefabric. actors. remoting. client. ActorRemotingExceptionHandler
- microsoft.
public class ActorRemotingExceptionHandler extends ServiceRemotingExceptionHandler
Essa classe fornece tratamento de exceções encontradas na comunicação com atores do service fabric por meio de interfaces de ator remoto.
Observações: Esse manipulador de exceção manipula exceções relacionadas aos seguintes cenários:
<li>
<p><cite>Duplicate Messages:</cite> </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><cite><xref uid="microsoft.servicefabric.actors.ActorConcurrencyLockTimeoutException" data-throw-if-not-resolved="false" data-raw-source="ActorConcurrencyLockTimeoutException"></xref>:</cite> </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>
Resumo do Construtor
Construtor | Description |
---|---|
ActorRemotingExceptionHandler(String traceId) |
Constrói um ActorRemotingExceptionHandler com uma ID de rastreamento especificada. |
Resumo do método
Modificador e tipo | Método e descrição |
---|---|
Exception |
handleException(ExceptionInformation exceptionInformation, OperationRetrySettings retrySettings)
Método que examina a exceção e determina como essa exceção pode ser tratada. |
Membros herdados
Detalhes do construtor
ActorRemotingExceptionHandler
public ActorRemotingExceptionHandler(String traceId)
Constrói um ActorRemotingExceptionHandler com uma ID de rastreamento especificada.
Parâmetros:
Detalhes do método
handleException
public ExceptionHandlingResult handleException(ExceptionInformation exceptionInformation, OperationRetrySettings retrySettings)
Método que examina a exceção e determina como essa exceção pode ser tratada.
Substituições:
ActorRemotingExceptionHandler.handleException(ExceptionInformation exceptionInformation, OperationRetrySettings retrySettings)Parâmetros:
Retornos:
Aplica-se a
Azure SDK for Java