code: @Override
    public final synchronized int writePage(P page) {
      int pageid = setPageID(page);
      writePage(pageid, page);
      return pageid;
    }
docs: Writes a page into this file. The method tests if the page has already an
  id, otherwise a new id is assigned and returned.
  
  @param page the page to be written
  @return the id of the page