keith-turner commented on a change in pull request #969: [WIP] Issue-967
URL: https://github.com/apache/fluo/pull/969#discussion_r152158725
 
 

 ##########
 File path: 
modules/api/src/main/java/org/apache/fluo/api/client/SnapshotBase.java
 ##########
 @@ -165,4 +167,22 @@
    * @return transactions start timestamp allocated from Oracle.
    */
   long getStartTimestamp();
+
+  default CompletableFuture<String> getsAsync(String row, Column column) {
+    return CompletableFuture.supplyAsync(() -> gets(row, column));
+  }
+
+  default CompletableFuture<String> getsAsync(String row, Column column, 
String defaultValue) {
+    return CompletableFuture.supplyAsync(() -> gets(row, column, 
defaultValue));
 
 Review comment:
   The 
[supplyAsync](https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/CompletableFuture.html#supplyAsync-java.util.function.Supplier-)
 method will run the task on the ForkJoin common pool which is a JVM wide pool. 
 I was thinking the default method should just do something like the following 
to avoid this.
   
   ```java
     return CompletableFuture.completedFuture(gets(row, column, defaultValue));
   ```

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to