code: synchronized void complete(PageWrapper page) {
          Preconditions.checkArgument(this.pageByOffset.containsKey(page.getOffset()), "Given page is not registered.");
          Preconditions.checkArgument(this.incompleteNewPageOffset == PagePointer.NO_OFFSET || this.incompleteNewPageOffset == page.getOffset(),
                  "Not expecting this page to be completed.");
  
          this.incompleteNewPageOffset = PagePointer.NO_OFFSET;
          long pageOffset = this.indexLength;
          this.indexLength += page.getPage().getLength();
  
          this.pageByOffset.remove(page.getOffset());
          page.setOffset(pageOffset);
          this.pageByOffset.put(page.getOffset(), page);
      }
docs: Indicates that any modifications to the given PageWrapper have completed.
  
  @param page The PageWrapper that has been completed. This instance's offset will be adjusted to the current value
  of getIndexLength(), and the stored index length will be incremented by this PageWrapper's length.