Code example for AtomicLong

0
 * Clone server model 1 
 * @author Danish Shrestha <dshrestha06@gmail.com> 
 * 
 */ 
public class clonesrv1 { 
	private static AtomicLong sequence = new AtomicLong();
 
	public void run() { 
		Context ctx = ZMQ.context(1);
		Socket publisher = ctx.socket(ZMQ.PUB);
		publisher.bind("tcp://*:5556");
 
		try { 
			Thread.sleep(200);
		} catch (InterruptedException e) {
			e.printStackTrace();
		} 
 
		Random random = new Random();