public static @Nullable InternalLocator getLocator() {
    synchronized (locatorLock) {
      return locator;
    }
  }
The cache owned by this locator, if any. Note that if a cache already exists because the
locator is being colocated in a normal member this field will be null.
geode-core/src/main/java/org/apache/geode/distributed/internal/InternalLocator.java