public void stop() {
    if (isAlive()) {
      logger.info("Stopping {}", this);
      try {
        locatorClient
            .stop(
                new HostAndPort(((InetSocketAddress) getSocketAddress()).getHostString(),
                    getPort()));
      } catch (ConnectException ignore) {
        // must not be running
      }

      boolean interrupted = Thread.interrupted();
      long waitTimeMillis = TcpServer.SHUTDOWN_WAIT_TIME * 2;
      try {
        // TcpServer up to SHUTDOWN_WAIT_TIME for its executor pool to shut down.
        // We wait 2 * SHUTDOWN_WAIT_TIME here to account for that shutdown, and then our own.
        waitToShutdown(waitTimeMillis);

      } catch (InterruptedException ex) {
        interrupted = true;
        logger.warn("Interrupted while stopping {}", this, ex);

        // Continue running -- doing our best to stop everything...
      } finally {
        if (interrupted) {
          Thread.currentThread().interrupt();
        }
      }

      if (isAlive()) {
        logger.fatal("Could not stop {} in {} seconds", this,
            TimeUnit.MILLISECONDS.toSeconds(waitTimeMillis));
      }
    }
  }
Services is a class internal to the membership module. As such, the ability to setServices
is available ony within the module. It's not part of the external API.
geode-membership/src/main/java/org/apache/geode/distributed/internal/membership/gms/locator/MembershipLocatorImpl.java