srkukarni commented on a change in pull request #1587: [WIP] Add key/value 
operations in StateContext
URL: https://github.com/apache/incubator-pulsar/pull/1587#discussion_r181881109
 
 

 ##########
 File path: 
pulsar-functions/instance/src/main/java/org/apache/pulsar/functions/instance/state/StateContext.java
 ##########
 @@ -18,15 +18,61 @@
  */
 package org.apache.pulsar.functions.instance.state;
 
+import java.nio.ByteBuffer;
 import java.util.concurrent.CompletableFuture;
 
 /**
  * A state context per function.
  */
 public interface StateContext {
 
+    /**
+     * Increment the given <i>key</i> by the given <i>amount</i>.
+     *
+     * @param key key to increment
+     * @param amount the amount incremented
+     */
     void incr(String key, long amount);
 
 Review comment:
   Should we instead do this as incrCount and getCount? Currently we have incr 
and getCount which dont seem to be related with each other.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to