Code example for AtomicInteger

Methods: addAndGet

0
	private AtomicInteger filesSuccess = new AtomicInteger(0);
 
	private Set<UploadItem> filesFailed = new HashSet<UploadItem>();
 
	protected synchronized void incFilesTotal() { 
		filesTotal.addAndGet(1);
	} 
 
	protected synchronized void incFilesSuccess() { 
		filesSuccess.addAndGet(1);
	} 
 
	public Integer getFilesTotal() {
		return filesTotal.get();
	} 
 
	public Integer getFilesSuccess() {
		return filesSuccess.get();
	} 
 
	public Set<UploadItem> getFilesFailed() {