The table below lists the lock modes that are to be used with the manual record locking function ctdbLockRecord().
These modes (except for the "_BLOCK" modes) are also returned by the ctdbGetRecordLock() function (see the explanations in parentheses).
FairCom DB API Record |
FairCom DB API .NET |
|
---|---|---|
CTLOCK_FREE |
FREE_LOCK |
Free the data record lock / (the record lock is removed). |
CTLOCK_READ |
READ_LOCK |
Non-blocking read locks / (the record has a read / shared lock). |
CTLOCK_READ_BLOCK |
READ_BLOCK_LOCK |
Blocking read locks. |
CTLOCK_WRITE |
WRITE_LOCK |
Non-blocking write locks / (the record has a write / exclusive lock). If the lock cannot be acquired, an error is returned. |
CTLOCK_WRITE_BLOCK |
WRITE_BLOCK_LOCK |
Blocking write locks. The thread will block until the lock can be acquired. |
Note: FairCom DB API .NET can find the Lock Modes listed in the LOCK_MODE enum.
See also Locking.