private void updateLocator() throws IOException {
    if (getInstall().isClientServer()) {
      HashMap<String, String> attributes = new HashMap<>();
      attributes.put("host", locatorAddress);
      attributes.put("port", Integer.toString(locatorPort));

      ContainerInstall.editXMLFile(cacheXMLFile, "locator", "pool", attributes, true);
    } else {
      setSystemProperty("locators", locatorAddress + "[" + locatorPort + "]");
    }
  }
Updates the address and port of the locator for this container

For Client Server installations the {@link #cacheXMLFile} is updated with the new address and
port. For Peer to Peer installations the locator must be specified as a system property and so
is added to the {@link #systemProperties} map under the 'locators' key in the form of
'{@link #locatorAddress}[{@link #locatorPort}]'.
geode-assembly/geode-assembly-test/src/main/java/org/apache/geode/session/tests/ServerContainer.java