Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-14770

Introduce RangesAtEndpoint.unwrap to simplify StreamSession.addTransferRanges

    XMLWordPrintableJSON

Details

    Description

      Arguably, since this is only performed in one place, we could leave it in addTransferRanges, but it should be a helper method anyway, and given unwrap() is a feature of Range, we should implement that in RangesAtEndpoint IMO. I have introduced this method, which avoids allocating a new collection unnecessarily, corroborates we have at most one wrap-around range, and introduced unit tests for the method.

      Attachments

        Issue Links

          Activity

            People

              benedict Benedict Elliott Smith
              benedict Benedict Elliott Smith
              Benedict Elliott Smith
              Ariel Weisberg
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: