private boolean isStoppable() {
    return isRunning() && getCache() != null;
  }
Determines whether the Server can be stopped in-process, such as when a Server is embedded in
an application and the ServerLauncher API is being used.

@return a boolean indicating whether the Server can be stopped in-process (the application's
        process with an embedded Server).
geode-core/src/main/java/org/apache/geode/distributed/ServerLauncher.java