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 | |
|---|---|---|
| abandonAllLocks(): Promise<void> | Abandons all locks currently held by this briefcase when none of the associated elements have | |
| abandonLocksForCurrentUnsavedTxn(): Promise<boolean> | Abandons the locks that were acquired during the current, unsaved Txn. | |
| abandonLocksForReversedTxn(txnId: string): Promise<boolean> | Abandons the locks that were acquired during a given Txn and all later Txns, all of which must already | |
| 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. | |
| acquireLocksForReinstatingTxn(txnId: string): Promise<boolean> | Re-acquire the locks that were previously acquired during a given Txn and all previous Txns. | |
| 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. | |
| clearTxnLockRecords(txnId: string): void | Clears the records of locks acquired for a given Txn and all later Txns from the local lock database. | |
| holdsExclusiveLock(id: string): boolean | Determine whether the owning iModel currently holds the exclusive lock on the specified element. | |
| holdsNecessaryLocksForReinstatingTxn(txnId: string): boolean | Checks whether the locks originally acquired for a specified reversed Txn, and all earlier Txns, were either not abandoned | |
| 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 lock server after editing the associated elements. |
Properties
| Name | Type | Description | |
|---|---|---|---|
| isServerBased Readonly | boolean | true if this LockControl uses a server-based concurrency approach. |
Defined in
- backend/src/LockControl.ts Line 17
Last Updated: 20 April, 2026
Found something wrong, missing, or unclear on this page? Raise an issue in our repo.