public static byte[] sortAndEncode(long objectId, List<StreamOffsetRange> streamOffsetRanges) {
        if (streamOffsetRanges == null || streamOffsetRanges.isEmpty()) {
            return Bytes.EMPTY;
        }
        streamOffsetRanges = new ArrayList<>(streamOffsetRanges);
        streamOffsetRanges.sort(Comparator.comparingLong(StreamOffsetRange::streamId));
        RANGES_CACHE.put(objectId, streamOffsetRanges);
        return encode(streamOffsetRanges);
    }
The order id of the object. Sort by this field to get the order of the objects which contains logically increasing streams.
<p>
When compact a batch of objects to a compacted object, this compacted object's order id will be assigned the value <code>first object's order
id in this batch</code>
metadata/src/main/java/org/apache/kafka/metadata/stream/S3StreamSetObject.java