Code example for AtomicLong

Methods: getAndAdd

0
            } 
         } 
         catch (Exception e) {
            d = 0;
         } 
         duration.getAndAdd(d);
 
      } 
 
   } 
 
   private class Putter extends MyRunnable { 
      private Putter(int id, AtomicLong duration) {
         this.id = id;
         this.duration = duration;
         mode = Mode.PUT;
      } 
   } 
 
   private class Getter extends MyRunnable { 
      private Getter(int id, AtomicLong duration) {