vcrfxia commented on code in PR #13496:
URL: https://github.com/apache/kafka/pull/13496#discussion_r1163422597


##########
streams/src/main/java/org/apache/kafka/streams/kstream/internals/KTableValueGetter.java:
##########
@@ -25,5 +25,21 @@
 
     ValueAndTimestamp<V> get(K key);
 
+    /**
+     * Returns the latest record version, associated with the provided key, 
with timestamp
+     * not exceeding the provided timestamp bound. This method may only be 
called if
+     * {@link #isVersioned()} is true.
+     */
+    default ValueAndTimestamp<V> get(K key, long asOfTimestamp) {
+        throw new UnsupportedOperationException("get(key, timestamp) is only 
supported for versioned stores");
+    }
+
+    /**
+     * @return whether this value getter supports multiple record versions for 
the same key.
+     *         If true, then {@link #get(Object, long)} must be implemented. 
If not, then
+     *         {@link #get(Object, long)} must not be called.
+     */
+    boolean isVersioned();

Review Comment:
   Heh, I made one of non-default in order to force future authors of new value 
getters to have to consider at least one of them, with the hope that 
considering one implies considering the other as well :) I will leave it as-is 
for now, can always be changed in the future.



-- 
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.

To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org

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

Reply via email to