ILock
             | 
          
public interface ILockApi
The ILockApi type exposes the following members.
| Name | Description | |
|---|---|---|
| IsLocked | Verify lockId is locking or not. | |
| Lock | Execute the lock context | |
| LockAndCheck | Execute the lock context and verify the query. If the query result is not found, throw an exception and release the lock context. | |
| Release | Release lock context by lock id | 
var lockApi = ctx.Use<ILockApi>(); lockApi.Lock(lockId, waitingTime, expiredTime); // do lock logic lockApi.Release(lockId);