Class SQLiteLockManager
An implementation of ILockManager that uses SQLite
Inherited Members
Namespace:FubarDev.WebDavServer.Locking.SQLite
Assembly:FubarDev.WebDavServer.Locking.SQLite.dll
Syntax
public class SQLiteLockManager : LockManagerBase, ILockManager
Constructors
| Improve this Doc View SourceSQLiteLockManager(IOptions<SQLiteLockManagerOptions>, ILockCleanupTask, ISystemClock, ILogger<SQLiteLockManager>)
Initializes a new instance of the SQLiteLockManager class.
Declaration
public SQLiteLockManager([NotNull] IOptions<SQLiteLockManagerOptions> sqliteOptions, [NotNull] ILockCleanupTask cleanupTask, [NotNull] ISystemClock systemClock, [NotNull] ILogger<SQLiteLockManager> logger)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.Extensions.Options.IOptions<SQLiteLockManagerOptions> | sqliteOptions | The SQLite options |
ILockCleanupTask | cleanupTask | The clean-up task for expired locks |
ISystemClock | systemClock | The system clock interface |
Microsoft.Extensions.Logging.ILogger<SQLiteLockManager> | logger | The logger |
Methods
| Improve this Doc View SourceBeginTransactionAsync(CancellationToken)
Begins a new transaction
Declaration
protected override Task<LockManagerBase.ILockManagerTransaction> BeginTransactionAsync(CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancellationToken | The cancellation token |
Returns
Type | Description |
---|---|
Task<LockManagerBase.ILockManagerTransaction> | The transaction to be used to update the active locks |
Overrides
| Improve this Doc View SourceCreateDatabase(String)
Creates a new database
Declaration
public static void CreateDatabase(string dbFileName)
Parameters
Type | Name | Description |
---|---|---|
String | dbFileName | The file name of the database |
EnsureDatabaseExists(String)
Ensures that a database with the given file name exists.
Declaration
public static void EnsureDatabaseExists(string dbFileName)
Parameters
Type | Name | Description |
---|---|---|
String | dbFileName | The file name of the database |