Get LockSet at given Location.

@param location
the Location
@return the LockSet at that Location
@throws DataflowAnalysisException
170490
public LockSet getFactAtLocation(Location location) throws DataflowAnalysisException {
        if (lockDataflow != null) {
            return lockDataflow.getFactAtLocation(location);
        } else {
            LockSet lockSet = cache.get(location);
            if (lockSet == null) {
                lockSet = new LockSet();
                lockSet.setDefaultLockCount(0);
                if (method.isSynchronized() && !method.isStatic()) {
                    // LockSet contains just the "this" reference
                    ValueNumber instance = vnaDataflow.getAnalysis().getThisValue();
                    lockSet.setLockCount(instance.getNumber(), 1);
                } else {
                    // LockSet is completely empty - nothing to do
                }
                cache.put(location, lockSet);
            }
            return lockSet;
        }
    }
357498
public int preventReboot (String whereFrom)
    {
        if (whereFrom == null) {
            throw new IllegalArgumentException("whereFrom must be descriptive.");
        }
        int lockId = _nextRebootLockId++;
        _rebootLocks.put(lockId, whereFrom);
        return lockId;
    }
252637
@Nullable public Location getLocation(final String locationUUID) throws FlexiantException {

        final Cluster cluster = this.getCluster(locationUUID);
        if (cluster != null) {
            return Location.from(cluster);
        }
        final Vdc vdc = this.getVdc(locationUUID);
        if (vdc != null) {
            final Cluster clusterofVDC = this.getCluster(vdc.getClusterUUID());
            checkState(clusterofVDC != null, String.format(
                "Error while retrieving cluster of vdc %s. VDC is in cluster %s, but this cluster "
                    + "does not exist. Looks like the vdc is corrupted.", vdc,
                vdc.getClusterUUID()));
            return Location.from(vdc, clusterofVDC);
        }
        return null;
    }
1167126
public LockData getPendingLock(String nodeId)
   {
      if (pendingLocks.contains(nodeId))
      {
         return lockedNodes.get(nodeId);
      }
      else
      {
         return null;
      }
   }
761571
public Integer lockProcessInstance(Long procInstId)
       throws DataAccessException {
        try {
            if (!isInTransaction()) throw
                new DataAccessException("Cannot lock activity instance without a transaction");
            return engineImpl.getDataAccess().lockProcessInstance(procInstId);
        } catch (SQLException e) {
            throw new DataAccessException(0, "Failed to lock process instance", e);
        }
    }
184374
protected Object getLock (int siteId)
    {
        Object lock = null;

        synchronized (_locks) {
            lock = _locks.get(siteId);

            // create a lock object if we haven't one already
            if (lock == null) {
                _locks.put(siteId, lock = new Object());
            }
        }

        return lock;
    }
82881
public CloseableDataStore getDataStore(URI location, String apiKey, MetricRegistry metricRegistry)
            throws IOException {
        String id = LocationUtil.getDataStoreIdentifier(location, apiKey);
        CloseableDataStore dataStore = null;
        while (dataStore == null) {
            // Get the cached DataStore if it exists
            DataStoreMonitor dataStoreMonitor = _dataStoreByLocation.get(id);
            if (dataStoreMonitor == null || (dataStore = dataStoreMonitor.getDataStore()) == null) {
                // Either the value wasn't cached or the cached value was closed before the reference count could
                // be incremented.  Create a new DataStore and cache it.
                CloseableDataStore unmonitoredDataStore;
                switch (LocationUtil.getLocationType(location)) {
                    case EMO_HOST_DISCOVERY:
                        unmonitoredDataStore = createDataStoreWithHostDiscovery(location, apiKey, metricRegistry);
                        break;
                    case EMO_URL:
                        unmonitoredDataStore = createDataStoreWithUrl(location, apiKey, metricRegistry);
                        break;
                    default:
                        throw new IllegalArgumentException("Location does not use a data store: " + location);
                }

                dataStoreMonitor = new DataStoreMonitor(id, unmonitoredDataStore);

                if (_dataStoreByLocation.putIfAbsent(id, dataStoreMonitor) != null) {
                    // Race condition; close the created DataStore and try again
                    dataStoreMonitor.closeNow();
                } else {
                    // New data store was cached; return the value
                    dataStore = dataStoreMonitor.getDataStore();
                }
            }
        }

        return dataStore;
    }
868586
public int getInstanceSlot(Instruction ins, ConstantPoolGen cpg) throws DataflowAnalysisException {
        if (!isValid()) {
            throw new DataflowAnalysisException("Accessing invalid frame at " + ins);
        }
        int numConsumed = ins.consumeStack(cpg);
        if (numConsumed == Const.UNPREDICTABLE) {
            throw new DataflowAnalysisException("Unpredictable stack consumption in " + ins);
        }
        if (numConsumed > getStackDepth()) {
            throw new DataflowAnalysisException("Stack underflow " + ins);
        }
        return getNumSlots() - numConsumed;
    }
683092
private Set getDestinationLocalitySet (BaseDestinationHandler destinationHandler, Capability capability)
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "getDestinationLocalitySet",
        new Object[]{destinationHandler, capability});
    
      // Check if the localisation should be deleted
      Set localitySet = null;

      //Get the locality sets as known by admin
      try
      {
          localitySet = _messageProcessor.getSIBDestinationLocalitySet(null, destinationHandler.getUuid().toString(), true);
      }
      catch(SIBExceptionBase e)
      {
        // FFDC
        FFDCFilter.processException(
          e,
          "com.ibm.ws.sib.processor.impl.DestinationChangeListener.getDestinationLocalitySet",
          "1:368:1.45",
          this);
      }

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "getDestinationLocalitySet", localitySet);

    return localitySet;
  }
598758
public static AbstractResource getRawResourceFrom(final String location) throws IOException {
        if (StringUtils.isBlank(location)) {
            throw new IllegalArgumentException("Provided location does not exist and is empty");
        }
        if (location.toLowerCase().startsWith(HTTP_URL_PREFIX)) {
            return new UrlResource(location);
        }
        if (location.toLowerCase().startsWith(CLASSPATH_URL_PREFIX)) {
            return new ClassPathResource(location.substring(CLASSPATH_URL_PREFIX.length()));
        }
        return new FileSystemResource(StringUtils.remove(location, FILE_URL_PREFIX));
    }
1176875
@Override
  public BlockLocationsResponse getBlockLocations(GetBlockLocationsRequest req) throws IOException {
    Server.setOrignalCaller(req.getOriginalCaller());
    return new BlockLocationsResponse(getBlockLocationsInternal(req.getSrc(), req.getOffset(),
        req.getLength(), BlockMetaInfoType.NONE));
  }
434856
public Lock getLock(String lockName, LockType type, String comment) {
		return new SQLLock(lockName,type,comment, getSleepTime(), this);
	}
257612
private Map<String, String> readExistingLocks(HLock lock) {
    // logger.debug("Started reading all columns");
    SliceQuery<String, String, String> sliceQuery = HFactory
        .createSliceQuery(keyspace, StringSerializer.get(), StringSerializer.get(), StringSerializer.get())
        .setColumnFamily(lockManagerConfigurator.getLockManagerCF()).setKey(lock.getPath());

    //we only care about the first 2 locks, anything else is simply queued.  Select 10 just to be safe if the clients aren't ordered properly
    sliceQuery.setRange(null, null, false, maxSelectSize);

    QueryResult<ColumnSlice<String, String>> queryResult = sliceQuery.execute();

    // logger.debug("Finished reading all columns");
    return getResults(queryResult);
  }
652513
public LockedInodePath lockFullInodePath(long id, LockPattern lockPattern)
      throws FileDoesNotExistException {
    LockedInodePath inodePath = lockInodePathById(id, lockPattern);
    if (!inodePath.fullPathExists()) {
      inodePath.close();
      throw new FileDoesNotExistException(ExceptionMessage.INODE_DOES_NOT_EXIST.getMessage(id));
    }
    return inodePath;
  }
974084
public static TypeAnnotationPosition
        typeCast(final List<TypePathEntry> location,
                 final int type_index) {
        return typeCast(location, null, type_index, -1);
    }
122365
public static InetAddress inetAddressFromLocation(String location) {
        try {
            return InetAddress.getByName(location);
        } catch (UnknownHostException e) {
            throw new DeepIOException(e);
        }
    }
1170189
@Override
	public void findLocation(final String location) {
		showAlternativesView(false);
		GwtCommand command = new GwtCommand(GetLocationForStringRequest.COMMAND);
		GetLocationForStringRequest request = new GetLocationForStringRequest();
		request.setCrs(mapPresenter.getViewPort().getCrs());
		request.setLocation(location);
		request.setServicePattern(servicePattern);
		command.setCommandRequest(request);
		GeomajasServerExtension.getInstance().getCommandService().execute(command,
				new AbstractCommandCallback<GetLocationForStringResponse>() {
			public void execute(GetLocationForStringResponse response) {
				goToLocation(response, location);
			}
		});
	}