public static void main(String[] args) {
    int port = getPort(args);
    GemFireMemcachedServer server = new GemFireMemcachedServer(port);
    server.start();
    while (true) {
      try {
        System.in.read();
      } catch (IOException e) {
        e.printStackTrace();
      }
    }
  }
shuts down this server and closes the embedded GemFire caching node
geode-memcached/src/main/java/org/apache/geode/memcached/GemFireMemcachedServer.java