@Override
    public long rowCount() {
        // We always get row valueCount from sub rts, as the merge segment could be less than sum of
        // sub rts because of grouping.
        long rowCount = 0;
        for (RealtimeSegment rts : segments.values()) {
            rowCount += rts.rowCount();
        }
        return rowCount;
    }
A thread may constantly call this method to finally push the segment into storage system.

@return -1: This rts group is done it's job, no more calls to handle; 0: should immediately call again; else: Next call period.
indexr-segment/src/main/java/io/indexr/segment/rt/RTSGroup.java