Returns the lock manager associated with this subscription
196942
public LockManager getSubscriptionLockManager()
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
        {
            SibTr.entry(tc, "getSubscriptionLockManager");
            SibTr.exit(tc, "getSubscriptionLockManager", _subscriptionLockManager);
        }
        return _subscriptionLockManager;
    }
915538
public static synchronized org.apache.ojb.odmg.locking.LockManager getLockManager()
    {
        if(lockManagerFactory == null)
        {
            lockManagerFactory = new LockManagerFactory();
        }
        return lockManagerFactory.getManager();
    }
1114729
def acquire_lock(self):
    
    if self.options.for_global_scope().lock:
      if not self._lock.acquired:
        self._lock.acquire()
787841
public void queryLock (NodeObject.Lock lock, ResultListener<String> listener)
    {
        // if it's being resolved, add the listener to the list
        LockHandler handler = _locks.get(lock);
        if (handler != null) {
            handler.listeners.add(listener);
            return;
        }

        // otherwise, return its present value
        listener.requestCompleted(queryLock(lock));
    }
809353
def get_lock(self, lockname, locktime=60, auto_renewal=False):
        '''  '''
        pid = os.getpid()
        caller = inspect.stack()[0][3]
        try:
            # rl = redlock.Redlock([{"host": settings.REDIS_SERVERS['std_redis']['host'], "port": settings.REDIS_SERVERS['std_redis']['port'], "db": settings.REDIS_SERVERS['std_redis']['db']}, ])
            rl = redis_lock.Lock(self, lockname, expire=locktime, auto_renewal=auto_renewal)
        except:
            if self.logger:
                self.logger.error('Process {0} ({1}) could not get lock {2}. Going ahead without locking!!! {3}'.format(pid, caller, lockname, traceback.format_exc()))
            return False
        try:
            lock = rl.acquire(blocking=False)
        except RedisError:
            return False
        if not lock:
            return False
        else:
            return rl
1318518
def acquire(self, *args, **kwargs):
        
        if not self.field.lockable:
            return
        if self.already_locked_by_model:
            self.sub_lock_mode = True
            return
        self.already_locked_by_model = True
        super(FieldLock, self).acquire(*args, **kwargs)
488191
public com.google.api.ads.admanager.axis.v201902.LockedOrientation getLockedOrientation() {
        return lockedOrientation;
    }
1186290
private final Result lockForUpgrade_(L locker) {
        Result result;
        if ((result = tryLockForUpgrade_(locker)) == Result.FAILED) {
            result = lockForUpgradeQueued(locker, addUpgradeWaiter());
        }
        return result;
    }
587772
function getInfoFromPackageLock (presetName) {
  debug('get preset info from package-lock.json')

  const baseDir = getBaseDir()
  const lockPath = path.join(baseDir, 'package-lock.json')

  if (!fs.existsSync(lockPath)) {
    debug('package-lock.json not exist')
    return null
  }

  debug(`package-lock.json path: ${lockPath}`)

  const lockInfo = _.get(require(lockPath), `dependencies.${presetName}`)

  debug('lock info: %o', lockInfo)

  if (!lockInfo) {
    return null
  }

  return {
    name: presetName,
    version: lockInfo.version,
    registryUrl: getRegistryUrl(lockInfo.resolved)
  }
}
1355064
def get_queue_system_lock(self, queue):
        

        key = self._key(LOCK_REDIS_KEY, queue)
        return Semaphore.get_system_lock(self.connection, key)
1258934
public function getLocker()
    {
        $user = null;

        if($this->hasProperty('locked_by') && !empty($this->locked_by)) {
            $user = $this->getObject('user.provider')->load($this->locked_by);
        }

        return $user;
    }
303288
def acquire_lock(cls, mode, user=None):
        
        if not user:
            return

        with EteSyncCache.lock:
            cls.user = user

            cls.etesync = cls._get_etesync_for_user(cls.user)

            if cls._should_sync():
                cls._mark_sync()
                cls.etesync.get_or_create_user_info(force_fetch=True)
                cls.etesync.sync_journal_list()
                for journal in cls.etesync.list():
                    cls.etesync.pull_journal(journal.uid)
            yield
            if cls.etesync.journal_list_is_dirty():
                cls.etesync.sync_journal_list()
            for journal in cls.etesync.list():
                if cls.etesync.journal_is_dirty(journal.uid):
                    cls.etesync.sync_journal(journal.uid)

            cls.etesync = None
            cls.user = None
434856
public Lock getLock(String lockName, LockType type, String comment) {
		return new SQLLock(lockName,type,comment, getSleepTime(), this);
	}
92132
private String getMessageForLock(LockIcon lockIcon, boolean hasLockedChildren) {

        String result = "";
        if (!hasLockedChildren && ((lockIcon == null) || (lockIcon == LockIcon.NONE))) {
            result = Messages.get().key(Messages.GUI_LOCK_REPORT_NOTHING_LOCKED_0);
        } else if ((lockIcon == LockIcon.OPEN) || (lockIcon == LockIcon.SHARED_OPEN)) {
            if (hasLockedChildren) {
                result = Messages.get().key(Messages.GUI_LOCK_REPORT_UNLOCK_ALL_MESSAGE_0);
            } else {
                result = Messages.get().key(Messages.GUI_LOCK_REPORT_UNLOCK_MESSAGE_0);
            }
        } else {
            if (hasLockedChildren) {
                result = Messages.get().key(Messages.GUI_LOCK_REPORT_STEAL_ALL_LOCKS_MESSAGE_0);
            } else {
                result = Messages.get().key(Messages.GUI_LOCK_REPORT_STEAL_LOCK_MESSAGE_0);
            }
        }
        return result;
    }
289580
Object getAsyncDeliveryLock() {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "getAsyncDeliveryLock");
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "getAsyncDeliveryLock", asyncDeliveryLock);
        return asyncDeliveryLock;
    }
168389
public Lock getLock(String lockName, LockType type, String comment) {
		Lock lock = new SimpleLock(lockName,type,comment, getSleepTime(), this);
		return lock;
	}
328158
private File getWriteLock() {
        File[] lckFiles = this.lockPath.listFiles(lockFilter);
        for (final File lckFile : lckFiles) {
            if (lockFilter.isWriterLockFile(lckFile)) {
                return lckFile;
            }
        }

        return null;
    }