Search Results for

    Show / Hide Table of Contents

    Class LeaseProvider

    This class represents an ActorSystem extension used for distributed lock within the actor system.

    Inheritance
    object
    LeaseProvider
    Implements
    IExtension
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Akka.Coordination
    Assembly: Akka.Coordination.dll
    Syntax
    public class LeaseProvider : IExtension

    Constructors

    | Edit this page View Source

    LeaseProvider(ExtendedActorSystem)

    Initializes a new instance of the LeaseProvider class.

    Declaration
    public LeaseProvider(ExtendedActorSystem system)
    Parameters
    Type Name Description
    ExtendedActorSystem system

    The actor system that hosts the lease.

    Methods

    | Edit this page View Source

    DefaultConfig()

    Retrieves the default lease options that Akka.NET uses when no configuration has been defined.

    Declaration
    public static Config DefaultConfig()
    Returns
    Type Description
    Config

    The configuration that contains default values for all lease options.

    | Edit this page View Source

    Get(ActorSystem)

    Retrieves the extension from the specified actor system.

    Declaration
    public static LeaseProvider Get(ActorSystem system)
    Parameters
    Type Name Description
    ActorSystem system

    The actor system from which to retrieve the extension.

    Returns
    Type Description
    LeaseProvider

    The extension retrieved from the given actor system.

    | Edit this page View Source

    GetLease(string, string, string)

    The configuration define at configPath must have a property lease-class that defines the fully qualified class name of the Lease implementation. The class must implement Lease and have constructor with LeaseSettings parameter and optionally ActorSystem parameter.

    Declaration
    public Lease GetLease(string leaseName, string configPath, string ownerName)
    Parameters
    Type Name Description
    string leaseName

    the name of the lease resource

    string configPath

    the path of configuration for the lease

    string ownerName

    the owner that will acquire the lease, e.g. hostname and port of the ActorSystem

    Returns
    Type Description
    Lease

    Implements

    IExtension

    Extension Methods

    ObjectExtensions.IsDefaultForType<T>(T)
    ObjectExtensions.AsOption<T>(T)
    Extensions.AsInstanceOf<T>(object)
    In this article
    • githubEdit this page
    • View Source
    Back to top
    Contribute
    • Project Chat
    • Discussion Forum
    • Source Code
    Support
    • Akka.NET Support Plans
    • Akka.NET Observability Tools
    • Akka.NET Training & Consulting
    Maintained By
    • Petabridge - The Akka.NET Company
    • Learn Akka.NET