code: public int getLinkId(@NotNull final PersistentStoreTransaction txn, @NotNull final String linkName, final boolean allowCreate) {
          return allowCreate ? linkIds.getOrAllocateId(txn, linkName) : linkIds.getId(txn, linkName);
      }
docs: Gets id of a link and creates the new one if necessary.
  
  @param linkName    name of the link.
  @param allowCreate if set to true and if there is no link named as linkName,
  create the new id for the linkName.
  @return < 0 if there is no such link and create=false, else id of the link