Returns lock data by node identifier.
516456
protected LockData getLockDataById(String nodeId)
   {
      try
      {
         return getLockDataById.run(nodeId);
      }
      catch (LockException e)
      {
         if (LOG.isTraceEnabled())
         {
            LOG.trace("An exception occurred: " + e.getMessage());
         }
      }
      return null;
   }
1297116
def data(self):
        """"""
        return NodeData(
            self.foo, get_arguments(self.bound_args), self.hints)
959433
def _get_template_pool_lock(self, id):
        """"""
        try:
            return self._hosting_device_locks[id]
        except KeyError:
            self._hosting_device_locks[id] = threading.Lock()
            return self._hosting_device_locks.get(id)
566902
public Set<Long> getLockedBlocks() {
    synchronized (mSharedMapsLock) {
      Set<Long> set = new HashSet<>();
      for (LockRecord lockRecord : mLockIdToRecordMap.values()) {
        set.add(lockRecord.getBlockId());
      }
      return set;
    }
  }
1282002
protected String getLockProperty(String key) {
        return lockProps != null ? lockProps.getProperty(key) : null;
    }
1322018
def node_state(id_):
    '''
    
    '''
    states_int = {
        0: 'RUNNING',
        1: 'REBOOTING',
        2: 'TERMINATED',
        3: 'PENDING',
        4: 'UNKNOWN',
        5: 'STOPPED',
        6: 'SUSPENDED',
        7: 'ERROR',
        8: 'PAUSED'}
    states_str = {
        'running': 'RUNNING',
        'rebooting': 'REBOOTING',
        'starting': 'STARTING',
        'terminated': 'TERMINATED',
        'pending': 'PENDING',
        'unknown': 'UNKNOWN',
        'stopping': 'STOPPING',
        'stopped': 'STOPPED',
        'suspended': 'SUSPENDED',
        'error': 'ERROR',
        'paused': 'PAUSED',
        'reconfiguring': 'RECONFIGURING'
    }
    return states_str[id_] if isinstance(id_, six.string_types) else states_int[id_]
119095
def get(self,oid):
		""""""
		try:
			self.lock.acquire()
			if oid not in self.data:
				return "NONE"
			else:
				return self.base_oid + oid + '\n' + self.data[oid]['type'] + '\n' +	str(self.data[oid]['value'])
		finally:
			self.lock.release()
974234
def findNode(self, node):
        
        ident = self.getRawIdent(node)
        if ident is None:
            ident = node
        try:
            return self.graph.node_data(ident)
        except KeyError:
            return None
1072962
def getIdent(self, node):
        
        ident = self.getRawIdent(node)
        if ident is not None:
            return ident
        node = self.findNode(node)
        if node is None:
            return None
        return node.graphident
208892
protected void peerAddedLock (String nodeName, NodeObject.Lock lock)
    {
        // check for hijacking
        if (_nodeobj.locks.contains(lock)) {
            log.warning("Client hijacked lock owned by this node", "lock", lock, "node", nodeName);
            droppedLock(lock);
        }

        // notify the handler, if any
        LockHandler handler = _locks.get(lock);
        if (handler != null) {
            handler.peerAddedLock(nodeName);
        }
    }
588749
def _restrict(node, npoint, cache=None):
    """"""
    if node is BDDNODEZERO or node is BDDNODEONE:
        return node

    if cache is None:
        cache = dict()

    try:
        ret = cache[node]
    except KeyError:
        try:
            val = npoint[node.root]
        except KeyError:
            lo = _restrict(node.lo, npoint, cache)
            hi = _restrict(node.hi, npoint, cache)
            ret = _bddnode(node.root, lo, hi)
        else:
            child = {BDDNODEZERO: node.lo, BDDNODEONE: node.hi}[val]
            ret = _restrict(child, npoint, cache)
        cache[node] = ret
    return ret
361655
def lock(self):
        """"""
        success = self.set_status(CONST.STATUS_LOCKCLOSED_INT)

        if success:
            self._json_state['status'] = CONST.STATUS_LOCKCLOSED

        return success
783776
def get(self):
        """"""
        data = b''
        with self.lock:
            data, self.buf = self.buf, b''

        return data
646256
public function getLockData() {
		$json = \Pressbooks\Utility\get_contents( $this->getLockDir( false ) . '/lock.json' );
		$output = json_decode( $json, true );
		return $output;
	}
764882
def getAllNodeUids(self):
        '''
            
        '''
        ret = set()

        for child in self:
            ret.update(child.getAllNodeUids())

        return ret
596112
private IEntityLock[] retrieveLocks(Class entityType, String entityKey, Integer lockType)
            throws LockingException {
        Date expiration =
                (multiServer)
                        ? new Date(System.currentTimeMillis() - getLockToleranceMillis())
                        : new Date();

        return getLockStore().findUnexpired(expiration, entityType, entityKey, lockType, null);
    }
1357878
public String getLockedByName() {

        String lockedBy = "";
        if (!getLock().isNullLock()) {
            // user
            lockedBy = getLock().getUserId().toString();
            try {
                lockedBy = getCurrentOuRelativeName(
                    CmsPrincipal.readPrincipalIncludingHistory(getCms(), getLock().getUserId()).getName());
            } catch (Throwable e) {
                lockedBy = e.getMessage();
            }
        }
        return lockedBy;
    }