ILock Api Interface
Provides method to operate with shared resources on different processes
Definition
Namespace: Casewhere.Runtime.DSL.Api
Assembly: Casewhere.Runtime (in Casewhere.Runtime.dll) Version: 2.9.8.6
Assembly: Casewhere.Runtime (in Casewhere.Runtime.dll) Version: 2.9.8.6
C#
public interface ILockApiExample
C#
var lockApi = ctx.Use<ILockApi>();
lockApi.Lock(lockId, waitingTime, expiredTime);
// do lock logic
lockApi.Release(lockId);
Methods
| 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 |