private boolean processLeafPages(@NotNull BtreeIndexNodeView node,
                                   @NotNull KeyValueProcessor processor) throws IOException {
    if (node.isIndexLeaf()) {
      return node.processMappings(processor);
    }

    // Copy children addresses first to avoid node's ByteBuffer invalidation
    final int[] childrenAddresses = new int[node.getChildrenCount() + 1];

    for (int i = 0; i < childrenAddresses.length; ++i) {
      childrenAddresses[i] = -node.addressAt(i);
    }

    if (childrenAddresses.length > 0) {
      try (BtreeIndexNodeView child = new BtreeIndexNodeView(true)) {
        for (int childrenAddress : childrenAddresses) {
          child.setAddress(childrenAddress);
          if (!processLeafPages(child, processor)) return false;
        }
      }
    }
    return true;
  }
private boolean processLeafPages(@NotNull BtreeIndexNodeView node,
                                   @NotNull KeyValueProcessor processor)