code: public Releaser increment()
    {
      while (true) {
        int count = this.refCount.get();
        if (count <= 0) {
          throw new ISE("Already closed!");
        }
        if (refCount.compareAndSet(count, count + 1)) {
          break;
        }
      }
  
      // This Releaser is supposed to be used from a single thread, so no synchronization/atomicity
      return new Releaser()
      {
        boolean released = false;
  
        @Override
        public void close()
        {
          if (!released) {
            decrement();
            released = true;
          } else {
            log.warn(new ISE("Already closed"), "Already closed");
          }
        }
      };
    }
docs: Increments the reference count by 1 and returns a {@link Releaser}. The returned {@link Releaser} is used to
  decrement the reference count when the caller no longer needs the resource.
  
  {@link Releaser}s are not thread-safe. If multiple threads need references to the same holder, they should
  each acquire their own {@link Releaser}.