docs.intersystems.com
InterSystems IRIS Data Platform 2019.2  /  InterSystems Programming Tools Index  /  Tools Index

InterSystems Programming Tools Index
Locks
Previous section           Next section
InterSystems: The power behind what matters   
Search:  


Read lock table information programmatically; remove locks; query and adjust lock table parameters.
Background Information
An important feature of any multi-process system is concurrency control, the ability to prevent different processes from changing a specific element of data at the same time, resulting in corruption. Thus ObjectScript and InterSystems SQL each provide commands for working with locks, which you use for concurrency control.
The %Persistent class provides a way to control concurrent access to objects, namely, the concurrency argument to %OpenId() and other methods of this class. These methods ultimately use the ObjectScript LOCK command. All persistent objects inherit these methods.
Internally, the in-memory lock table contains the current locks, along with information about the processes that hold those locks. You can use the Management Portal to view the lock table and (if necessary) remove locks; see “Monitoring Locks” in the Monitoring Guide.
For more information on locks, see the article Locking and Concurrency Control.
Available Tools
In addition, InterSystems provides the following tools:
^$LOCK
This structured system variable returns information about locks.
Availability: All namespaces.
%SYS.LockQuery class
Enables you to read lock table information. This class provides details and examples.
Availability: All namespaces.
SYS.Lock class
Enables you to remove locks. Also enables you to query and adjust lock table parameters. This class provides methods like the following:
Availability: %SYS namespace.
See Also


Previous section           Next section
Send us comments on this page
View this book as PDF   |  Download all PDFs
Copyright © 1997-2019 InterSystems Corporation, Cambridge, MA
Content Date/Time: 2019-10-18 05:16:51