Future<?> shutdown() {
            // Do not provide a quiet period (default is 2s) to accept more requests. Once we have decided to shutdown,
            // no new requests should be accepted.
            group.shutdownGracefully(/*quiet period*/0, /*timeout*/2, TimeUnit.SECONDS);
            return group.terminationFuture();
        }
Gracefully shutsdown the event loop and returns the termination future which signals that all jobs are done.
gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Cluster.java