code: public static synchronized String getNewId() {
  		// unique across JVMs as long as each has a different workerID
  		// based on Twitter's Snowflake algorithm
  		long timestamp = timestamp();
  
  		if (lastTimestamp == timestamp) {
  			sequence = (sequence + 1) & SEQUENCE_MASK;
  			if (sequence == 0) {
  				timestamp = tilNextMillis(lastTimestamp);
  			}
  		} else {
  			sequence = 0;
  		}
  
  		if (timestamp < lastTimestamp) {
  			throw new IllegalStateException(String.format("Clock moved backwards.  "
  					+ "Refusing to generate id for %d milliseconds", lastTimestamp - timestamp));
  		}
  
  		lastTimestamp = timestamp;
  		return Long.toString(((timestamp - TIMER_OFFSET) << TIMESTAMP_LEFT_SHIFT) |
  											(dataCenterId << DATACENTER_ID_SHIFT) |
  													(workerId << WORKER_ID_SHIFT) |
  																	(sequence));
  
  	}
docs: Distributed id generator. Relies on node/worker ids and datacenter ids to prevent collisions.
  @return a long unique ID string of digits