@Deprecated
    public static SessionWindows with(final Duration inactivityGap) {
        final String msgPrefix = prepareMillisCheckFailMsgPrefix(inactivityGap, "inactivityGap");
        final long inactivityGapMs = validateMillisecondDuration(inactivityGap, msgPrefix);

        return new SessionWindows(inactivityGapMs, Math.max(DEPRECATED_DEFAULT_24_HR_GRACE_PERIOD - inactivityGapMs, 0), false);
    }
Create a new window specification with the specified inactivity gap.

@param inactivityGap the gap of inactivity between sessions
@return a new window specification without specifying a grace period (default to 24 hours minus {@code inactivityGap})
@throws IllegalArgumentException if {@code inactivityGap} is zero or negative or can't be represented as {@code long milliseconds}
@deprecated since 3.0. Use {@link #ofInactivityGapWithNoGrace(Duration)} instead
streams/src/main/java/org/apache/kafka/streams/kstream/SessionWindows.java