code: public long nextUniqueTransaction(long timeMs) {
          long id = timeMs;
          for (; ; ) {
              long old = transactionID.get();
              if (old >= id)
                  id = old + 1;
              if (transactionID.compareAndSet(old, id))
                  break;
          }
          return id;
      }
docs: the transaction id are generated as unique timestamps
  
  @param timeMs in milliseconds
  @return a unique transactionId