code: public List<PendingEvent> refreshSegmentEventWriters(Consumer<Segment> segmentSealedCallBack) {
          log.info("Refreshing segments for stream {}", stream);
          return updateSegments(Futures.getAndHandleExceptions(
                  controller.getCurrentSegments(stream.getScope(), stream.getStreamName()), RuntimeException::new),
                  segmentSealedCallBack);
      }
docs: Refresh the latest list of segments in the given stream.
  
  @param segmentSealedCallBack Method to be executed on receiving SegmentSealed from SSS.
  @return A list of events that were sent to old segments and never acked. These should be
  re-sent.