Example #1
0
void Lock::CollectionLock::relockAsDatabaseExclusive(Lock::DBLock& dbLock) {
    _lockState->unlock(_id);

    dbLock.relockWithMode(MODE_X);

    // don't need the lock, but need something to unlock in the destructor
    _lockState->lock(_id, MODE_IX);
}
Example #2
0
    void Lock::CollectionLock::relockWithMode(LockMode mode, Lock::DBLock& dbLock ) {
        if (supportsDocLocking() || enableCollectionLocking) {
            _lockState->unlock(_id);
        }

        dbLock.relockWithMode( mode );

        if (supportsDocLocking() || enableCollectionLocking) {
            _lockState->lock(_id, mode);
        }
    }
Example #3
0
void Lock::CollectionLock::relockAsDatabaseExclusive(Lock::DBLock& dbLock) {
    if (supportsDocLocking() || enableCollectionLocking) {
        _lockState->unlock(_id);
    }

    dbLock.relockWithMode(MODE_X);

    if (supportsDocLocking() || enableCollectionLocking) {
        // don't need the lock, but need something to unlock in the destructor
        _lockState->lock(_id, MODE_IX);
    }
}