Here you can find the source of createAtomicId()
private static AtomicLong createAtomicId()
//package com.java2s; //License from project: Apache License import java.util.Random; import java.util.concurrent.atomic.AtomicLong; public class Main { private static AtomicLong createAtomicId() { int baseId = new Random(System.currentTimeMillis()).nextInt(1000000) + 20000; return new AtomicLong((long) baseId); }/* w w w . jav a2s .co m*/ }