code: @VisibleForTesting
      CompletableFuture<List<Long>> getBucketOffsets(DirectSegmentAccess segment, TableBucket bucket, TimeoutTimer timer) {
          val result = new ArrayList<Long>();
          AtomicLong offset = new AtomicLong(bucket.getSegmentOffset());
          return Futures.loop(
                  () -> offset.get() >= 0,
                  () -> {
                      result.add(offset.get());
                      return getBackpointerOffset(segment, offset.get(), timer.getRemaining());
                  },
                  offset::set,
                  this.executor)
                        .thenApply(v -> result);
      }
docs: Gets the offsets for all the Table Entries in the given {@link TableBucket}.
  
  @param segment A {@link DirectSegmentAccess}
  @param bucket  The {@link TableBucket} to get offsets for.
  @param timer   Timer for the operation.
  @return A CompletableFuture that, when completed, will contain a List of offsets, with the first offset being the
  {@link TableBucket}'s offset itself, then descending down in the order of backpointers. If the {@link TableBucket}
  is partial, then the list will be empty.