code: public synchronized static void shutdown() {
          Set<String> protocols = instances.keySet();
  
          if (protocols.size() > 0) {
              Iterator<String> i = protocols.iterator();
  
              SyslogUtility.sleep(SyslogConstants.THREAD_LOOP_INTERVAL_DEFAULT);
  
              while(i.hasNext()) {
                  String protocol = i.next();
  
                  SyslogIF syslog = instances.get(protocol);
  
                  syslog.shutdown();
              }
  
              instances.clear();
          }
      }
docs: shutdown() gracefully shuts down all defined Syslog protocols,
  which includes flushing all queues and connections and finally
  clearing all instances (including those initialized by default).