Code example for AtomicLong

0
/** 
 * Internal data structure used to track progress of a {@link Step}. 
 */ 
@InterfaceAudience.Private 
final class StepTracking extends AbstractTracking { 
  AtomicLong count = new AtomicLong();
  long total = Long.MIN_VALUE;
 
  @Override 
  public StepTracking clone() { 
    StepTracking clone = new StepTracking();
    super.copy(clone);
    clone.count = new AtomicLong(count.get());
    clone.total = total;
    return clone;
  } 
}