code: public CompletableFuture<Void> initialize(Duration timeout) {
          if (isInitialized()) {
              log.warn("Reinitializing.");
          }
  
          TimeoutTimer timer = new TimeoutTimer(timeout);
          return this.getLength
                  .apply(timer.getRemaining())
                  .thenCompose(length -> {
                      if (length <= FOOTER_LENGTH) {
                          // Empty index.
                          setState(length, PagePointer.NO_OFFSET, 0);
                          return CompletableFuture.completedFuture(null);
                      }
  
                      long footerOffset = getFooterOffset(length);
                      return this.read
                              .apply(footerOffset, FOOTER_LENGTH, timer.getRemaining())
                              .thenAccept(footer -> initialize(footer, footerOffset, length));
                  });
      }
docs: Initializes the BTreeIndex by fetching metadata from the external data source. This method must be invoked (and
  completed) prior to executing any other operation on this instance.
  
  @param timeout Timeout for the operation.
  @return A CompletableFuture that, when completed, will indicate that the operation completed.