Returns repository record corresponding to the <code>location</code> pointer.

@param location the location of a record.
@return log record instance if <code>location</code> points to a record in the repository;
<code>null</code> otherwise.
334918
public RepositoryLogRecord getRecord(RepositoryPointer location) {
		if (!(location instanceof RepositoryPointerImpl)) {
			return null;
		}
		RepositoryPointerImpl real = (RepositoryPointerImpl)location;
		long pos = real.getRecordOffset();
		File file = fileBrowser.findFile(real);
		if (pos < 0 || file == null) {
			return null;
		}
		OneFileRecordIterator current = new OneFileRecordIterator(file, -1, new AllAcceptVerifier());
		RepositoryLogRecord rec = null;
		if (current.setPosition(pos)) {
			rec = current.next();
		}
		current.close();
		if (rec != null && real.equals(rec.getRepositoryPointer())) {
			return rec;
		} 		
		
		return null;
		
	}
1185526
def get_location(self):
        
        response = self.connection.make_request('GET', self.name,
                                                query_args='location')
        body = response.read()
        if response.status == 200:
            rs = ResultSet(self)
            h = handler.XmlHandler(rs, self)
            xml.sax.parseString(body, h)
            return rs.LocationConstraint
        else:
            raise self.connection.provider.storage_response_error(
                response.status, response.reason, body)
1130151
@Override
    public File getServerLogDirectory() {
        String logLocation = TrConfigurator.getLogLocation();
        if (logLocation != null) {
            return new File(logLocation);
        } else {
            return null;
        }
    }
704521
AsteriskQueueMemberImpl getMember(String location)
    {
        synchronized (members)
        {
            if (members.containsKey(location))
            {
                return members.get(location);
            }
        }
        return null;
    }
122365
public static InetAddress inetAddressFromLocation(String location) {
        try {
            return InetAddress.getByName(location);
        } catch (UnknownHostException e) {
            throw new DeepIOException(e);
        }
    }
547184
public Observable<UsagesListResultInner> listUsagesAsync(String location) {
        return listUsagesWithServiceResponseAsync(location).map(new Func1<ServiceResponse<UsagesListResultInner>, UsagesListResultInner>() {
            @Override
            public UsagesListResultInner call(ServiceResponse<UsagesListResultInner> response) {
                return response.body();
            }
        });
    }
614681
private void setLocationFromUri(String location) throws IOException
    {
        try
        {
            if (!location.startsWith("cassandra://"))
                throw new Exception("Bad scheme." + location);
            
            String[] urlParts = location.split("\\?");
            if (urlParts.length > 1)
            {
                Map<String, String> urlQuery = getQueryMap(urlParts[1]);
                AbstractType comparator = BytesType.instance;
                if (urlQuery.containsKey("comparator"))
                    comparator = TypeParser.parse(urlQuery.get("comparator"));
                if (urlQuery.containsKey("slice_start"))
                    slice_start = comparator.fromString(urlQuery.get("slice_start"));
                if (urlQuery.containsKey("slice_end"))
                    slice_end = comparator.fromString(urlQuery.get("slice_end"));
                if (urlQuery.containsKey("reversed"))
                    slice_reverse = Boolean.parseBoolean(urlQuery.get("reversed"));
                if (urlQuery.containsKey("limit"))
                    limit = Integer.parseInt(urlQuery.get("limit"));
                if (urlQuery.containsKey("allow_deletes"))
                    allow_deletes = Boolean.parseBoolean(urlQuery.get("allow_deletes"));
                if (urlQuery.containsKey("widerows"))
                    widerows = Boolean.parseBoolean(urlQuery.get("widerows"));
                if (urlQuery.containsKey("use_secondary"))
                    usePartitionFilter = Boolean.parseBoolean(urlQuery.get("use_secondary"));
                if (urlQuery.containsKey("split_size"))
                    splitSize = Integer.parseInt(urlQuery.get("split_size"));
                if (urlQuery.containsKey("partitioner"))
                    partitionerClass = urlQuery.get("partitioner");
                if (urlQuery.containsKey("init_address"))
                    initHostAddress = urlQuery.get("init_address");
                if (urlQuery.containsKey("rpc_port"))
                    rpcPort = urlQuery.get("rpc_port");
            }
            String[] parts = urlParts[0].split("/+");
            String[] credentialsAndKeyspace = parts[1].split("@");
            if (credentialsAndKeyspace.length > 1)
            {
                String[] credentials = credentialsAndKeyspace[0].split(":");
                username = credentials[0];
                password = credentials[1];
                keyspace = credentialsAndKeyspace[1];
            }
            else
            {
                keyspace = parts[1];
            }
            column_family = parts[2];
        }
        catch (Exception e)
        {
            throw new IOException("Expected 'cassandra://[username:password@]<keyspace>/<columnfamily>" +
                    "[?slice_start=<start>&slice_end=<end>[&reversed=true][&limit=1]" +
                    "[&allow_deletes=true][&widerows=true][&use_secondary=true]" +
                    "[&comparator=<comparator>][&split_size=<size>][&partitioner=<partitioner>]" +
                    "[&init_address=<host>][&rpc_port=<port>]]': " + e.getMessage());
        }
    }
1277572
public void setPaginationLocation(final PaginationLocation location) {
		getOrCreateComponentModel().paginationLocation = location == null ? PaginationLocation.AUTO : location;
	}
727236
private static Feature createLocation(final Point point,
            final LocationType locationType) {
        final Feature location = new Feature();
        location.setGeometry(point);
        location.setProperty("locationType", locationType);
        location.setId("location");
        return location;
    }
9253
public static PendingResult<ElevationResult> getByPoint(GeoApiContext context, LatLng location) {
    return context.get(API_CONFIG, SingularResponse.class, "locations", location.toString());
  }
554735
public byte[] getRecord(final long iPosition) throws IOException {
    if (iPosition == -1)
      return null;

    acquireSharedLock();
    try {

      final long[] pos = getRelativePosition(iPosition);
      final OFile file = files[(int) pos[0]];

      final int recordSize = file.readInt(pos[1]);
      if (recordSize <= 0)
        // RECORD DELETED
        return null;

      if (pos[1] + RECORD_FIX_SIZE + recordSize > file.getFilledUpTo())
        throw new OStorageException(
            "Error on reading record from file '"
                + file.getName()
                + "', position "
                + iPosition
                + ", size "
                + OFileUtils.getSizeAsString(recordSize)
                + ": the record size is bigger then the file itself ("
                + OFileUtils.getSizeAsString(getFilledUpTo())
                + "). Probably the record is dirty due to a previous crash. It is strongly suggested to restore the database or export and reimport this one.");

      final byte[] content = new byte[recordSize];
      file.read(pos[1] + RECORD_FIX_SIZE, content, recordSize);
      return content;

    } finally {
      releaseSharedLock();
    }
  }
1342946
public String getFormattedRecord(RepositoryLogRecord record, Locale locale) {
		StringBuilder sb = new StringBuilder(300);

		//create opening tag for the CBE Event
		createEventOTag(sb, record, locale);
		
		//add the CBE elements
		createExtendedElement(sb, record);
		createExtendedElement(sb, "CommonBaseEventLogRecord:sequenceNumber", "long", String.valueOf(record.getSequence()));
		createExtendedElement(sb, "CommonBaseEventLogRecord:threadID", "int", String.valueOf(record.getThreadID()));
		if (record.getLoggerName() != null){
			createExtendedElement(sb, "CommonBaseEventLogRecord:loggerName", "string", record.getLoggerName());
		}

		for (String name: record.getExtensions().keySet()) {
			// Don't report pthreadId here since it is reported as part of the sourceComponentId.
			if (!RepositoryLogRecord.PTHREADID.equals(name)) {
				createExtendedElement(sb, record, name);
			}
		}
		
		if (headerProps.getProperty(ServerInstanceLogRecordList.HEADER_VERSION) != null)
			createExtendedElement(sb, "version", "string", headerProps.getProperty(ServerInstanceLogRecordList.HEADER_VERSION));
		if (headerProps.getProperty(ServerInstanceLogRecordList.HEADER_PROCESSID) != null)
			createExtendedElement(sb, "processId", "string", headerProps.getProperty(ServerInstanceLogRecordList.HEADER_PROCESSID));
		if (headerProps.getProperty(ServerInstanceLogRecordList.HEADER_SERVER_NAME) != null)
			createExtendedElement(sb, "processName", "string", headerProps.getProperty(ServerInstanceLogRecordList.HEADER_SERVER_NAME));

		
		switch (record.getLocalizable()) {
		case WsLogRecord.REQUIRES_LOCALIZATION :
			createExtendedElement(sb, "localizable", "string", STR_REQUIRES_LOCALIZATION);     //yes
			break;
		case WsLogRecord.REQUIRES_NO_LOCALIZATION:
			createExtendedElement(sb, "localizable", "string", STR_REQUIRES_NO_LOCALIZATION);  //no	
			break;
		default :
			createExtendedElement(sb, "localizable", "string", STR_DEFAULT_LOCALIZATION);  //default
		break;  
		}

		createSourceElement(sb, record);
		createMessageElement(sb, record);
		createSituationElement(sb);
		
		//create closing tag for the CBE Event
		createEventCTag(sb);
		
		return sb.toString();
	}
1167606
public com.google.api.ads.adwords.axis.v201809.cm.Location getLocation() {
        return location;
    }
476126
public Set<SourceSinkInfo> getSourceSinkInfoSet(Location location) {
        Set<SourceSinkInfo> result = sourceSinkMap.get(location);
        return result != null ? result : Collections.<SourceSinkInfo> emptySet();
    }
1313152
@Override
	public M getMonitor(L location) {
		M monitor = getMonitorOnce(location);
		// In case monitor was removed from manager, we retry
		if (monitor == null) {
			removeMonitorInformation(location);
			monitor = getMonitorOnce(location);
		}
		return monitor;
	}
662817
public static URI getBaseUriForLocation(URI location) {
        // Any request to the public ELBs must be made over https
        boolean useHttps = location.getHost().toLowerCase().endsWith("nexus.bazaarvoice.com");

        return UriBuilder.fromUri(location)
                .scheme(useHttps ? "https" : "http")
                .replacePath(DataStoreClient.SERVICE_PATH)
                .replaceQuery(null)
                .build();
    }
71888
public static StashLocation getStashLocation(URI location) {
        checkArgument(getLocationType(location) == LocationType.STASH, "Not a stash location");

        String host, path;
        boolean useLatestDirectory;

        Matcher matcher = getLocatorMatcher(location);
        if (matcher.matches()) {
            // Stash is only available for the default group.  Make sure that's the case here
            String group = Objects.firstNonNull(matcher.group("group"), DEFAULT_GROUP);
            checkArgument(DEFAULT_GROUP.equals(group), "Stash not available for group: %s", group);

            // Stash it not available for local
            String universe = matcher.group("universe");
            checkArgument(universe != null, "Stash not available for local");

            Region region = getRegion(Objects.firstNonNull(matcher.group("region"), DEFAULT_REGION));

            host = getS3BucketForRegion(region);
            path = getS3PathForUniverse(universe);
            useLatestDirectory = true;
        } else {
            // The location refers to the actual S3 bucket and path
            host = location.getHost();
            path = location.getPath();
            // Stash paths don't have a leading slash
            if (path != null && path.startsWith("/")) {
                path = path.substring(1);
            }
            useLatestDirectory = false;
        }

        return new StashLocation(host, path, useLatestDirectory);
    }