code: public final long getNewID ()
    {
      return m_aLock.locked ( () -> {
        if (m_nID >= m_nLastID)
        {
          // Read new IDs
          final long nNewID = readAndUpdateIDCounter (m_nReserveCount);
  
          // the existing ID may not be < than the previously used ID!
          if (m_nLastID >= 0 && nNewID < m_nID)
            throw new IllegalStateException ("The read value " +
                                             nNewID +
                                             " is smaller than the last known ID " +
                                             m_nID +
                                             "!");
  
          m_nID = nNewID;
          m_nLastID = nNewID + m_nReserveCount;
        }
        return m_nID++;
      });
    }
docs: /*
  Note: this implementation must be synchronized because the method calling
  this only uses a readLock!