private boolean shouldLocatorsBeCoordinators() {
    // check for settings that would require only locators to hold the
    // coordinator - e.g., security and network-partition detection
    boolean locatorsAreCoordinators;
    boolean networkPartitionDetectionEnabled =
        distributionConfig.getEnableNetworkPartitionDetection();
    if (networkPartitionDetectionEnabled) {
      locatorsAreCoordinators = true;
    } else {
      // check if security is enabled
      String prop = distributionConfig.getSecurityPeerAuthInit();
      locatorsAreCoordinators = prop != null && !prop.isEmpty();
      if (!locatorsAreCoordinators) {
        locatorsAreCoordinators = Boolean.getBoolean(LOCATORS_PREFERRED_AS_COORDINATORS);
      }
    }
    return locatorsAreCoordinators;
  }
Start peer location in this locator. If you plan on starting a distributed system later, this
method should be called first so that the distributed system can use this locator.

@return returns the port that the locator to which the locator is bound
@since GemFire 5.7
geode-core/src/main/java/org/apache/geode/distributed/internal/InternalLocator.java