code: private void shutdownExecutorGroups(long quietPeriod, long timeout, TimeUnit unit, EventExecutorGroup...groups) {
      Exception ex = null;
      List<Future<?>> futures = new ArrayList<>();
      for (EventExecutorGroup group : groups) {
        if (group == null) {
          continue;
        }
        futures.add(group.shutdownGracefully(quietPeriod, timeout, unit));
      }
  
      for (Future<?> future : futures) {
        try {
          future.syncUninterruptibly();
        } catch (Exception e) {
          if (ex == null) {
            ex = e;
          } else {
            ex.addSuppressed(e);
          }
        }
      }
  
      if (ex != null) {
        // Just log, don't rethrow since it shouldn't happen normally and
        // there is nothing much can be done from the caller side
        LOG.warn("Exception raised when shutting down executor", ex);
      }
    }
docs: Shutdown the given list of {@link EventExecutorGroup}s gracefully.