Class LeaseProvider
This class represents an ActorSystem extension used for distributed lock within the actor system.
Implements
Inherited Members
Namespace: Akka.Coordination
Assembly: Akka.Coordination.dll
Syntax
public class LeaseProvider : IExtension
Constructors
| Improve this Doc View SourceLeaseProvider(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
| Improve this Doc View SourceDefaultConfig()
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. |
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. |
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 |
Returns
Type | Description |
---|---|
Lease |