ActorConcurrencySettings Class

  • java.lang.Object
    • microsoft.servicefabric.actors.runtime.ActorConcurrencySettings

public class ActorConcurrencySettings

The method calls on an actor dispatched via in turn with support for logical call context based reentrancy. This class provides the settings to configure the turn based concurrency lock for actors.

Constructor Summary

Constructor Description
ActorConcurrencySettings()

Initializes a new instance of the ActorConcurrencySettings class.

Method Summary

Modifier and Type Method and Description
Duration getLockTimeout()

sets timeout for the turn based concurrency lock. If the runtime cannot acquire the lock to dispatch the method call, it will throw ActorConcurrencyLockTimeoutException exception. This exception will unwind the logical call chain and the call will retried up to a configured maximum amount of times. The actual timeout value for the concurrency lock can be higher as the runtime will add a random interval to the supplied value.

ActorReentrancyMode getReentrancyMode()

gets Reentrancy mode for actor method calls.

void setLockTimeout(Duration timeout)

sets timeout for the turn based concurrency lock. If the runtime cannot acquire the lock to dispatch the method call, it will throw ActorConcurrencyLockTimeoutException exception.

void setReentrancyMode(ActorReentrancyMode mode)

sets Reentrancy mode for actor method calls.

Constructor Details

ActorConcurrencySettings

public ActorConcurrencySettings()

Initializes a new instance of the ActorConcurrencySettings class.

Method Details

getLockTimeout

public Duration getLockTimeout()

sets timeout for the turn based concurrency lock. If the runtime cannot acquire the lock to dispatch the method call, it will throw ActorConcurrencyLockTimeoutException exception. This exception will unwind the logical call chain and the call will retried up to a configured maximum amount of times. The actual timeout value for the concurrency lock can be higher as the runtime will add a random interval to the supplied value.

Returns:

Timeout for the turn based concurrency lock.

getReentrancyMode

public ActorReentrancyMode getReentrancyMode()

gets Reentrancy mode for actor method calls.

Returns:

ActorReentrancyMode for the actor method calls.

setLockTimeout

public void setLockTimeout(Duration timeout)

sets timeout for the turn based concurrency lock. If the runtime cannot acquire the lock to dispatch the method call, it will throw ActorConcurrencyLockTimeoutException exception.

Parameters:

timeout - This exception will unwind the logical call chain and the call will retried up to a configured maximum amount of times. The actual timeout value for the concurrency lock can be higher as the runtime will add a random interval to the supplied value.

setReentrancyMode

public void setReentrancyMode(ActorReentrancyMode mode)

sets Reentrancy mode for actor method calls.

Parameters:

mode - reentrancy mode. ActorReentrancyMode for the actor method calls.

Applies to