ConcurrencyControl.LocksManager Class

Beta  

Locks manager This class is used to acquire certain kinds of locks preemptively. It can also be used to query what locks are held. See ConcurrencyControl.requestResources for how to acquire locks as they are needed.

Methods

Name Description
holdsLock(lock: LockProps): boolean Returns true if the specified lock is held.  
lockCodeSpecs(requestContext: AuthorizedClientRequestContext): Promise<void> Obtain the CodeSpec lock.  
lockModels(requestContext: AuthorizedClientRequestContext, models: ModelProps[]): Promise<void> Lock the specified models exclusively.  
lockSchema(requestContext: AuthorizedClientRequestContext): Promise<void> Obtain the schema lock.  

Properties

Name Type Description
hasCodeSpecsLock Accessor ReadOnly boolean Returns true if the CodeSpecs lock is held.  
hasSchemaLock Accessor ReadOnly boolean Returns true if the schema lock is held.  

Defined in

Last Updated: 11 June, 2024