@Override
    public default void close() throws Exception {
        for (final Step<?, ?> step : this.asAdmin().getSteps()) {
            if (step instanceof AutoCloseable)
                ((AutoCloseable) step).close();
        }

        notifyClose();
    }
Releases resources opened in any steps that implement {@link AutoCloseable}. If this method is overridden,the
implementer should invoke {@link #notifyClose()}.
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/Traversal.java