Code example for AtomicLong

0
 
/** 
 */ 
public class FireDepartmentMetrics 
{ 
  private final AtomicLong processedCount = new AtomicLong(0);
  private final AtomicLong thrownAwayCount = new AtomicLong(0);
  private final AtomicLong unparseableCount = new AtomicLong(0);
  private final AtomicLong rowOutputCount = new AtomicLong(0);
 
  public void incrementProcessed() 
  { 
    processedCount.incrementAndGet();
  } 
 
  public void incrementThrownAway() 
  { 
    thrownAwayCount.incrementAndGet();
  } 
 
  public void incrementUnparseable()