Code example for AtomicLong

0
* @author Jennifer Hickey 
* 
*/ 
public class LongAsStringObjectFactory implements ObjectFactory<String> {
 
	private AtomicLong counter = new AtomicLong();
 
	public String instance() {
		return String.valueOf(counter.getAndIncrement());
	} 
 
}