Show / Hide Table of Contents

    Class DistributedLockSettings

    The settings to be applied to the configured IDistributedLockManager.

    Inheritance
    object
    DistributedLockSettings
    NullLockSettings
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Silverback.Background
    Assembly: Silverback.Core.dll
    Syntax
    public class DistributedLockSettings

    Constructors

    | Improve this doc View source

    DistributedLockSettings(string, string?, TimeSpan?, TimeSpan?, TimeSpan?, TimeSpan?)

    Initializes a new instance of the DistributedLockSettings class.

    Declaration
    public DistributedLockSettings(string resourceName = "", string? uniqueId = null, TimeSpan? acquireTimeout = null, TimeSpan? acquireRetryInterval = null, TimeSpan? heartbeatTimeout = null, TimeSpan? heartbeatInterval = null)
    Parameters
    Type Name Description
    string resourceName

    The name of the lock / the resource being locked.

    string uniqueId

    A unique identifier representing the entity trying to acquire the lock. Th default is a new Guid.

    TimeSpan? acquireTimeout

    After the acquire timeout is expired the lock manager will abort the lock acquisition. The default is no timeout.

    TimeSpan? acquireRetryInterval

    The interval at which the lock manager checks if a lock can be acquired for the specified resource. The default is 30 seconds.

    TimeSpan? heartbeatTimeout

    After the heartbeat timeout is expired the lock will be considered released. The default is 1 minute.

    TimeSpan? heartbeatInterval

    The interval at which the heartbeat has to be sent. The default is 1 second.

    Properties

    | Improve this doc View source

    AcquireRetryInterval

    Gets the interval at which the lock manager checks if a lock can be acquired for the specified resource.

    Declaration
    public TimeSpan AcquireRetryInterval { get; }
    Property Value
    Type Description
    TimeSpan
    | Improve this doc View source

    AcquireTimeout

    Gets the timeout after which the lock manager will abort the lock acquisition.

    Declaration
    public TimeSpan? AcquireTimeout { get; }
    Property Value
    Type Description
    TimeSpan?
    | Improve this doc View source

    FailedHeartbeatsThreshold

    Gets the maximum number of heartbeats that can be failed to be sent before stopping.

    Declaration
    public int FailedHeartbeatsThreshold { get; }
    Property Value
    Type Description
    int
    | Improve this doc View source

    HeartbeatInterval

    Gets the interval at which the heartbeat has to be sent.

    Declaration
    public TimeSpan HeartbeatInterval { get; }
    Property Value
    Type Description
    TimeSpan
    | Improve this doc View source

    HeartbeatTimeout

    Gets the timeout after which the lock will be considered released if no heartbeat is sent.

    Declaration
    public TimeSpan HeartbeatTimeout { get; }
    Property Value
    Type Description
    TimeSpan
    | Improve this doc View source

    NoLock

    Gets the DistributedLockSettings signaling that no lock is to be checked and acquired. Corresponds to an instance of NullLockSettings.

    Declaration
    public static DistributedLockSettings NoLock { get; }
    Property Value
    Type Description
    DistributedLockSettings
    | Improve this doc View source

    ResourceName

    Gets the name of the lock / the resource being locked.

    Declaration
    public string ResourceName { get; }
    Property Value
    Type Description
    string
    | Improve this doc View source

    UniqueId

    Gets a unique identifier representing the entity trying to acquire the lock.

    Declaration
    public string UniqueId { get; }
    Property Value
    Type Description
    string
    • Improve this doc
    • View source
    GitHub E-Mail
    ↑ Back to top © 2020 Sergio Aquilini