code: long putIfAbsent(K key, long newValue) {
      for (;;) {
        AtomicLong atomic = map.get(key);
        if (atomic == null) {
          atomic = map.putIfAbsent(key, new AtomicLong(newValue));
          if (atomic == null) {
            return 0L;
          }
          // atomic is now non-null; fall through
        }
  
        long oldValue = atomic.get();
        if (oldValue == 0L) {
          // don't compareAndSet a zero
          if (map.replace(key, atomic, new AtomicLong(newValue))) {
            return 0L;
          }
          // atomic replaced
          continue;
        }
  
        return oldValue;
      }
    }
docs: If {@code key} is not already associated with a value or if {@code key} is associated with
  zero, associate it with {@code newValue}. Returns the previous value associated with
  {@code key}, or zero if there was no mapping for {@code key}.