IFencedLock Interface
Namespace: Hazelcast.CP
Assembly: Hazelcast.Net.dll
Represents a linearizable, distributed, reentrant implementation of the Java Lock.
public interface IFencedLock : ICPDistributedObject, IDistributedObject, IAsyncDisposable
  Inherited Members
Remarks
The IFencedLock is CP with respect to the CAP principle. It works on top of the Raft consensus algorithm. It offers linearizability during crash-stop failures and network partitions. If a network partition occurs, it remains available on at most one side of the partition.
A IFencedLock works within the context of a LockContext.
Properties
| Name | Description | 
|---|---|
| InvalidFence | Gets the identifier representing an invalid fence.  | 
      
Methods
| Name | Description | 
|---|---|
| GetFenceAsync(LockContext) | Gets the fencing token, if the lock is held by the specified   | 
      
| GetLockCountAsync(LockContext) | Gets the reentrant lock count of the lock, for whichever context is locking it.  | 
      
| IsLockedAsync(LockContext) | Determines whether this lock is held by any context or not.  | 
      
| IsLockedByContextAsync(LockContext) | Determines whether the lock is held by the specified   | 
      
| LockAndGetFenceAsync(LockContext) | Acquires the lock and returns the fencing token assigned to the specified   | 
      
| LockAsync(LockContext) | Acquires the lock for the specified   | 
      
| TryLockAndGetFenceAsync(LockContext) | Tries to acquire the lock and return the fencing token assigned to the specified   | 
      
| TryLockAndGetFenceAsync(LockContext, TimeSpan) | Tries to acquire the lock and return the fencing token assigned to the specified   | 
      
| TryLockAsync(LockContext) | Tries to acquire the lock for the specified   | 
      
| TryLockAsync(LockContext, TimeSpan) | Tries to acquire the lock for the specified   | 
      
| UnlockAsync(LockContext) | Releases the lock if the lock is currently held by the specified   |