class OffsetRangeTracker extends RestrictionTracker<OffsetRange, Long> implements Sizes.HasSize {

  @Override
  public double getSize() {
    // If we have never attempted an offset, we return the length of the entire range.
    if (lastAttemptedOffset == null) {
      return range.getTo() - range.getFrom();
    }

    // Otherwise we return the length from where we are to where we are attempting to get to
    // with a minimum of zero in case we have claimed beyond the end of the range.
    return Math.max(range.getTo() - lastAttemptedOffset, 0);
  }

  public  OffsetRangeTracker(OffsetRange range);

}