LockControl Interface
Interface for acquiring element locks to coordinate simultaneous edits from multiple briefcases.
@see IModelDb.locks to access the locks for an iModel.
Methods
Name | Description | |
---|---|---|
acquireLocks(arg: { exclusive?: Id64Arg, shared?: Id64Arg }): Promise<void> | Acquire locks on one or more elements from the lock server, if required and not already held. | |
checkExclusiveLock(id: string, type: string, operation: string): void | Throw if locks are required and the exclusive lock is not held on the supplied element. | |
checkSharedLock(id: string, type: string, operation: string): void | Throw if locks are required and a shared lock is not held on the supplied element. | |
holdsExclusiveLock(id: string): boolean | Determine whether the owning iModel currently holds the exclusive lock on the specified element. | |
holdsSharedLock(id: string): boolean | Determine whether the owning iModel currently holds a shared lock on the specified element. | |
releaseAllLocks(): Promise<void> | Release all locks currently held by this briefcase from the locker server. |
Properties
Name | Type | Description | |
---|---|---|---|
isServerBased Readonly | boolean | true if this LockControl uses a server-based concurrency approach. |
Defined in
- core/backend/src/LockControl.ts Line 17
Last Updated: 14 November, 2024
Found something wrong, missing, or unclear on this page?Raise an issue in our repo.