#include <locker.hpp>
hds::db::Locker::Locker |
( |
| ) |
|
virtual hds::db::Locker::~Locker |
( |
| ) |
|
|
virtual |
virtual ErrCode hds::db::Locker::lastError |
( |
| ) |
const |
|
pure virtual |
Get list of database locks. lastError() should return:
EC_UNDEFINED on internal error, EC_NO_ERROR on success.
- Parameters
-
locks | Resulted list of locks. |
Implemented in hds::db::LockerQSql.
Try to obtain a lock with provided description. lastError() should return:
EC_LOCKED_READ if can't obtain lock because provided name locked for reading, EC_LOCKED_WRITE if can't obtain lock because provided name locked for writing, EC_UNDEFINED on internal error, EC_NO_ERROR if lock is obtained successfully.
- Parameters
-
lock_descr | Description of the lock. |
- Returns
- Uniq index of lock obtained on success. Has no means on error.
Implemented in hds::db::LockerQSql.
virtual void hds::db::Locker::release |
( |
const DbIndex & |
id | ) |
|
|
pure virtual |
Tries to release lock with provided id. lastError() should return:
EC_UNDEFINED on internal error, EC_NO_ERROR on success.
- Parameters
-
id | Uniq index of lock to be released. |
Implemented in hds::db::LockerQSql.
virtual size_t hds::db::Locker::releaseAll |
( |
| ) |
|
|
pure virtual |
Tries to release all locks. lastError() may return:
EC_UNDEFINED on internal error, EC_NO_ERROR on success.
- Returns
- number of locks released.
Implemented in hds::db::LockerQSql.
The documentation for this class was generated from the following file:
- /net/opt/univers/ubp-i-15.3-centos7-x64.urij/include/hds_db/base/locker.hpp