code: private CompletableFuture<SegmentProperties> openWrite(String segmentName, AtomicReference<SegmentHandle> handleRef, Duration timeout) {
          return this.storage
                  .openWrite(segmentName)
                  .thenComposeAsync(handle -> {
                      handleRef.set(handle);
                      return this.storage.getStreamSegmentInfo(segmentName, timeout);
                  }, this.executor);
      }
docs: Opens the given segment for writing.
  
  @param segmentName The segment to open.
  @param handleRef   An AtomicReference that will contain the SegmentHandle for the opened segment.
  @param timeout     Timeout for the operation.
  @return A Future that will contain information about the opened Segment.