示例#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);
}
示例#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);
        }
    }
示例#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);
    }
}