public static boolean hasLocator() {
    return InternalLocator.hasLocator();
  }
Returns true if a locator exists in this JVM.

@return true if a locator exists in this JVM.
@since GemFire 7.0
geode-core/src/main/java/org/apache/geode/distributed/Locator.java