code: public static String closeAllAndShutdown(String logDir, long timeOutMillis) throws IOException {
          String path = null;
          final VoltTrace tracer = s_tracer;
  
          if (tracer != null) {
              if (logDir != null) {
                  path = dump(logDir);
              }
  
              s_tracer = null;
  
              if (timeOutMillis >= 0) {
                  try {
                      tracer.m_writerThread.shutdownNow();
                      tracer.m_writerThread.awaitTermination(timeOutMillis, TimeUnit.MILLISECONDS);
                  } catch (InterruptedException e) {
                  }
              }
  
              tracer.shutdown();
          }
  
          return path;
      }
docs: Close all open files and wait for shutdown.
  @param logDir           The directory to write the trace events to, null to skip writing to file.
  @param timeOutMillis    Timeout in milliseconds. Negative to not wait
  @return The path to the trace file if written, or null if a write is already in progress.