Xuanwo commented on code in PR #2112:
URL: 
https://github.com/apache/incubator-opendal/pull/2112#discussion_r1176390528


##########
bindings/java/src/main/java/org/apache/opendal/Operator.java:
##########
@@ -50,17 +49,24 @@ public Operator(String schema, Map<String, String> params) {
 
     private native void write(long ptr, String fileName, String content);
 
+    private native void asyncWrite(long ptr, String fileName, String content, 
CompletableFuture<Boolean> future);
+
     private native String read(long ptr, String fileName);
 
     private native void delete(long ptr, String fileName);
 
     private native long stat(long ptr, String file);
 
-
     public void write(String fileName, String content) {
         write(this.ptr, fileName, content);
     }
 
+    public CompletableFuture<Boolean> asyncWrite(String fileName, String 
content) {

Review Comment:
   > We can provide sync and async functions in the OperatorImpl class and make 
it implement SyncOperator and AsyncOperator interfaces.
   
   I prefer the simpler solution. `writeSync` and `writeAsync` LGTM.



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

Reply via email to