Show / Hide Table of Contents

Interface LockManagerBase.ILockManagerTransaction

This interface must be implemented by the inheriting class.

Inherited Members
IDisposable.Dispose()
Namespace:FubarDev.WebDavServer.Locking
Assembly:FubarDev.WebDavServer.dll
Syntax
protected interface ILockManagerTransaction : IDisposable

Methods

| Improve this Doc View Source

AddAsync(IActiveLock, CancellationToken)

Adds a new active lock

Declaration
[NotNull]
Task<bool> AddAsync([NotNull] IActiveLock activeLock, CancellationToken cancellationToken)
Parameters
Type Name Description
IActiveLock activeLock

The active lock to add

CancellationToken cancellationToken

The cancellation token

Returns
Type Description
Task<Boolean>

true when adding the lock succeeded

| Improve this Doc View Source

CommitAsync(CancellationToken)

Commits the changes made during the transaction

Declaration
[NotNull]
Task CommitAsync(CancellationToken cancellationToken)
Parameters
Type Name Description
CancellationToken cancellationToken

The cancellation token

Returns
Type Description
Task

The async task

| Improve this Doc View Source

GetActiveLocksAsync(CancellationToken)

Gets all active locks

Declaration
[NotNull]
[ItemNotNull]
Task<IReadOnlyCollection<IActiveLock>> GetActiveLocksAsync(CancellationToken cancellationToken)
Parameters
Type Name Description
CancellationToken cancellationToken

The cancellation token

Returns
Type Description
Task<IReadOnlyCollection<IActiveLock>>

The collection of all active locks

| Improve this Doc View Source

GetAsync(String, CancellationToken)

Gets an active lock by its stateToken

Declaration
[NotNull]
[ItemCanBeNull]
Task<IActiveLock> GetAsync([NotNull] string stateToken, CancellationToken cancellationToken)
Parameters
Type Name Description
String stateToken

The state token to search for

CancellationToken cancellationToken

The cancellation token

Returns
Type Description
Task<IActiveLock>

The active lock for the state token or null when the lock wasn't found

| Improve this Doc View Source

RemoveAsync(String, CancellationToken)

Removes an active lock with the given stateToken

Declaration
[NotNull]
Task<bool> RemoveAsync([NotNull] string stateToken, CancellationToken cancellationToken)
Parameters
Type Name Description
String stateToken

The state token of the active lock to remove

CancellationToken cancellationToken

The cancellation token

Returns
Type Description
Task<Boolean>

true when a lock with the given stateToken existed and could be removed

| Improve this Doc View Source

UpdateAsync(IActiveLock, CancellationToken)

Updates the active lock

Declaration
[NotNull]
Task<bool> UpdateAsync([NotNull] IActiveLock activeLock, CancellationToken cancellationToken)
Parameters
Type Name Description
IActiveLock activeLock

The active lock with the updated values

CancellationToken cancellationToken

The cancellation token

Returns
Type Description
Task<Boolean>

true when the lock was updatet, false when the lock was added instead

  • Improve this Doc
  • View Source
Back to top Copyright © 2016-2017 Fubar Development Junker
Generated by DocFX