@Override
    public String segmentName(final long segmentId) {
        if (segmentId < 0) {
            throw new IllegalArgumentException(
                "Negative segment IDs are reserved for reserved segments, "
                    + "which have custom names that should not be accessed from this method");
        }

        return super.segmentName(segmentId);
    }
A {@link Segments} implementation which uses a single underlying RocksDB instance.
Regular segments with {@code segmentId >= 0} expire according to the specified
retention period. "Reserved" segments with {@code segmentId < 0} do not expire
and are completely separate from regular segments in that methods such as
{@link #getSegmentForTimestamp(long)}, {@link #getOrCreateSegment(long, ProcessorContext)},
{@link #getOrCreateSegmentIfLive(long, ProcessorContext, long)},
{@link #segments(long, long, boolean)}, and {@link #allSegments(boolean)}
only return regular segments and not reserved segments. The methods {@link #flush()}
and {@link #close()} flush and close both regular and reserved segments, due to
the fact that both types of segments share the same physical RocksDB instance.
To create a reserved segment, use {@link #createReservedSegment(long, String)} instead.
streams/src/main/java/org/apache/kafka/streams/state/internals/LogicalKeyValueSegments.java