IPM
LockManager Class Reference

Utility to make managing locking/unlocking easier in more complex settings. More...

Inheritance diagram for LockManager:
Inheritance graph

Public Member Functions

_.Library.Status OnClose ()
 Utility to make managing locking/unlocking easier in more complex settings. More...
 
_.Library.Status OnNew (_.Library.Boolean pImmediateRelease)
 Set pImmediateRelease to 0 to keep locks in an instance of this class. More...
 

Private Attributes

 __Cache
 Map of (<global>,<flags>) to lock count. More...
 
 __ImmediateReleaseOnClose
 If true, locks are released immediately when the instance of this class goes out of scope. More...
 
 __OIDCache
 Map of (<class>,<id>) to lock count. More...
 

Detailed Description

Utility to make managing locking/unlocking easier in more complex settings.

Usage pattern:

  1. Create an instance of this class at the beginning of a method.
  2. Call the Lock() and (optionally) Unlock() methods.
  3. When the object goes out of scope, remaining locks are automatically released with the correct flags.

Member Function Documentation

◆ OnClose()

_.Library.Status OnClose ( )

Utility to make managing locking/unlocking easier in more complex settings.

Usage pattern:

  1. Create an instance of this class at the beginning of a method.
  2. Call the Lock() and (optionally) Unlock() methods.
  3. When the object goes out of scope, remaining locks are automatically released with the correct flags.

Performs an immediate unlock

◆ OnNew()

_.Library.Status OnNew ( _.Library.Boolean  pImmediateRelease)

Set pImmediateRelease to 0 to keep locks in an instance of this class.

until the end of the current transaction even once the instance goes out of scope.

Member Data Documentation

◆ __Cache

__Cache
private

Map of (<global>,<flags>) to lock count.

 

◆ __ImmediateReleaseOnClose

__ImmediateReleaseOnClose
private

If true, locks are released immediately when the instance of this class goes out of scope.

(If not, standard handling for transactions will apply instead.)  

◆ __OIDCache

__OIDCache
private

Map of (<class>,<id>) to lock count.