LockControl Interface

Beta  

Interface for acquiring element locks to coordinate simultaneous edits from multiple briefcases.

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.  
close(): void Close the local lock control database  
elementWasCreated(id: string): void Notification that a new element was just created.  
holdsExclusiveLock(id: string): boolean Determine whether the supplied element currently holds the exclusive lock  
holdsSharedLock(id: string): boolean Determine whether the supplied element currently holds a shared lock  
releaseAllLocks(): Promise<void> Release all locks currently held by this Briefcase from the lock server.  

Properties

Name Type Description
isServerBased Readonly boolean true if this LockControl uses a server-based concurrency approach.  

Defined in

Last Updated: 20 June, 2023