public static SessionBytesStoreSupplier inMemorySessionStore(final String name, final Duration retentionPeriod) {
        Objects.requireNonNull(name, "name cannot be null");

        final String msgPrefix = prepareMillisCheckFailMsgPrefix(retentionPeriod, "retentionPeriod");
        final long retentionPeriodMs = validateMillisecondDuration(retentionPeriod, msgPrefix);
        if (retentionPeriodMs < 0) {
            throw new IllegalArgumentException("retentionPeriod cannot be negative");
        }
        return new InMemorySessionBytesStoreSupplier(name, retentionPeriodMs);
    }
Create an in-memory {@link SessionBytesStoreSupplier}.

@param name              name of the store (cannot be {@code null})
@param retentionPeriod   length of time to retain data in the store (cannot be negative)
                         (note that the retention period must be at least as long enough to
                         contain the inactivity gap of the session and the entire grace period.)
@return an instance of a {@link  SessionBytesStoreSupplier}
streams/src/main/java/org/apache/kafka/streams/state/Stores.java