Code example for AtomicLong

Methods: incrementAndGet

0
public final class SimpleConnectionSignUp implements ConnectionSignUp { 
 
	private final AtomicLong userIdSequence = new AtomicLong();
	 
	public String execute(Connection<?> connection) {
		return Long.toString(userIdSequence.incrementAndGet());
	} 
 
}