Class StreamingQcow2Writer.DataClusterIterable

java.lang.Object
com.morpheusdata.core.util.image.StreamingQcow2Writer.DataClusterIterable
All Implemented Interfaces:
Iterable<Long>
Enclosing class:
StreamingQcow2Writer

public static class StreamingQcow2Writer.DataClusterIterable extends Object implements Iterable<Long>
An iterable that converts byte ranges into cluster indices. This allows iteration over all clusters that contain actual data, handling overlapping ranges and ensuring clusters are returned in sorted order.
  • Constructor Details

    • DataClusterIterable

      public DataClusterIterable(Iterable<StreamingQcow2Writer.Range<Long>> ranges)
      Constructs a DataClusterIterable from the given byte ranges.
      Parameters:
      ranges - the byte ranges containing actual data
  • Method Details

    • iterator

      public Iterator<Long> iterator()
      Returns an iterator over cluster indices in sorted order. Handles range boundaries and ensures no duplicate clusters are returned.
      Specified by:
      iterator in interface Iterable<Long>
      Returns:
      an iterator of cluster indices