Code example for AtomicLong

Methods: getAndIncrement

0
 
	Channel channel; 
 
	final Executor runner = new Executor() { 
 
		private final AtomicLong counter = new AtomicLong(0); 
 
		final String name = "# DDF Feed Client - " + counter.getAndIncrement(); 
 
		@Override 
		public void execute(final Runnable task) { 
			new Thread(task, name).start(); 
		} 
 
	}; 
 
	final ChannelFactory channelFactory = new NioDatagramChannelFactory(runner); 
 
}