code: public static String safeCreateUUID() {
          synchronized (EventProcessorHost.UUID_SYNCHRONIZER) {
              final UUID newUuid = UUID.randomUUID();
              return newUuid.toString();
          }
      }
docs: Synchronized string UUID generation convenience method.
  <p>
  We saw null and empty strings returned from UUID.randomUUID().toString() when used from multiple
  threads and there is no clear answer on the net about whether it is really thread-safe or not.
  <p>
  One of the major users of UUIDs is the built-in lease and checkpoint manager, which can be replaced by
  user implementations. This UUID generation method is public so user implementations can use it as well and
  avoid the problems.
  
  @return A string UUID with dashes but no curly brackets.