Acquire Lock Algorithm - lucienlazar/plsql-application-locking GitHub Wiki

The three types of locks handled by the framework

Shared (S)

used for reading;

shared locks can be acquired when other shared or write exclusive locks already exist on the resource;

cannot be acquired when a full exclusive lock already exists on the resource.

Write exclusive (WX)

used for writing;

write exclusive locks can be acquired when shared locks already exist on the resource;

cannot be acquired when other write exclusive or full exclusive lock already exist on the resource.

Full exclusive (FX)

strictly exclusive;

can be acquired only when no other locks exist on the resource.

The acquire lock possibilities