You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2021/05/19 18:56:55 UTC

[GitHub] [kafka] jlprat commented on a change in pull request #10729: KAFKA-12809: Remove Deprecated methods under Stores

jlprat commented on a change in pull request #10729:
URL: https://github.com/apache/kafka/pull/10729#discussion_r635506242



##########
File path: streams/src/main/java/org/apache/kafka/streams/state/Stores.java
##########
@@ -364,38 +324,22 @@ public static WindowBytesStoreSupplier inMemoryWindowStore(final String name,
      * Create a persistent {@link SessionBytesStoreSupplier}.
      *
      * @param name              name of the store (cannot be {@code null})
-     * @param retentionPeriodMs length of time to retain data in the store (cannot be negative)
+     * @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}
-     * @deprecated since 2.1 Use {@link Stores#persistentSessionStore(String, Duration)} instead
      */
-    @Deprecated // continuing to support Windows#maintainMs/segmentInterval in fallback mode
     public static SessionBytesStoreSupplier persistentSessionStore(final String name,
-                                                                   final long retentionPeriodMs) {
+                                                                   final Duration retentionPeriod) {
+        final String msgPrefix = prepareMillisCheckFailMsgPrefix(retentionPeriod, "retentionPeriod");
+        final long retentionPeriodMs = validateMillisecondDuration(retentionPeriod, msgPrefix);
         Objects.requireNonNull(name, "name cannot be null");

Review comment:
       Fixed




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org