mynameborat commented on a change in pull request #1560:
URL: https://github.com/apache/samza/pull/1560#discussion_r761388896
##########
File path:
samza-api/src/main/java/org/apache/samza/table/AsyncReadWriteTable.java
##########
@@ -90,6 +91,27 @@
*/
CompletableFuture<Void> putAllAsync(List<Entry<K, V>> entries, Object ...
args);
+ /**
+ * Asynchronously updates an existing record for a given key with the
specified update.
+ *
+ * @param key the key with which the specified {@code value} is to be
associated.
+ * @param update the update applied to the record associated with a given
{@code key}.
+ * @param args additional arguments
+ * @throws NullPointerException if the specified {@code key} is {@code null}.
+ * @return CompletableFuture for the operation
+ */
+ CompletableFuture<Void> updateAsync(K key, U update, Object ... args);
+
+ /**
+ * Asynchronously updates the existing records for the given keys with their
corresponding updates.
+ *
+ * @param updates the key and update mappings.
+ * @param args additional arguments
+ * @throws NullPointerException if any of the specified {@code entries} has
{@code null} as key.
+ * @return CompletableFuture for the operation
+ */
+ CompletableFuture<Void> updateAllAsync(List<Entry<K, U>> updates, Object ...
args);
Review comment:
Can you change the return type to CompletionStage instead of future?
we don't want to accidentally promote folks to fallback to synchronous
programming by using .get() or join on this. Please apply the same comment for
all the interfaces.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]