code: private void shutdownGracefully(final Iterator<EventExecutorGroup> iterator) {
          if (iterator.hasNext()) {
              EventExecutorGroup group = iterator.next();
              if (!group.isShuttingDown()) {
                  group.shutdownGracefully().addListener(future -> {
                      if (!future.isSuccess()) {
                          //log.debug("shutdown of {} resulted in exception", group, future.cause());
                      }
                      shutdownGracefully(iterator);
                  });
              }
          }
      }
docs: Shutdown executor in order.
  
  @param iterator Executors to shutdown.