UpdateCounter.java

package org.microspace.table;

import java.math.BigInteger;

/**
 * Count updates in a  BigInteger in a single thread.
 * @author Gaspar Sinai - {@literal gaspar.sinai@microspace.org}
 * @version 2016-06-26
 */
public class UpdateCounter {
	BigInteger updateCount = BigInteger.ZERO;
	
	public BigInteger incrementAndGet () {
		updateCount = updateCount.add(BigInteger.ONE);
		return updateCount;
	}
	
	public BigInteger get () {
		return updateCount;
	}
	
}