fluo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] keith-turner commented on a change in pull request #969: [WIP] Issue-967
Date Thu, 01 Jan 1970 00:00:00 GMT
keith-turner commented on a change in pull request #969: [WIP] Issue-967
URL: https://github.com/apache/fluo/pull/969#discussion_r152021014
 
 

 ##########
 File path: modules/core/src/main/java/org/apache/fluo/core/impl/TransactionImpl.java
 ##########
 @@ -265,6 +269,42 @@ public Bytes get(Bytes row, Column column) {
     return ret;
   }
 
+  @Override
+  public CompletableFuture<Bytes> getAsync(Bytes row, Column column) {
+    if (asyncReader == null) {
+      asyncReader = new AsyncReader(this);
+    }
+
+    return asyncReader.get(row, column);
+  }
+
+  @Override
+  public CompletableFuture<Bytes> getAsync(Bytes row, Column column, Bytes defaultValue)
{
+    if (asyncReader == null) {
+      asyncReader = new AsyncReader(this);
+    }
+
+    return asyncReader.get(row, column, defaultValue);
+  }
+
+  @Override
+  public CompletableFuture<String> getsAsync(String row, Column column) {
+    if (asyncReader == null) {
 
 Review comment:
   Could shorten these method with a method like the following
   
   ```java
   private AsyncReader getAsyncReader() {
     if (asyncReader == null) {
   ?    asyncReader = new AsyncReader(this);
   ?  }
   }
   ```
   
   Then could do the following below
   
   ```java
     return getAsyncReader().gets(row, column);
   ```

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message