]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.db/src/org/simantics/db/AsyncRequestProcessorSpecific.java
Use java.util.Consumer instead of os.utils.datastructures.Callback
[simantics/platform.git] / bundles / org.simantics.db / src / org / simantics / db / AsyncRequestProcessorSpecific.java
index 182d5686268a862044f209bfd89f454e3bd6adc1..429696cda867a078c72ade8baef22733b2786be5 100644 (file)
@@ -11,6 +11,8 @@
  *******************************************************************************/
 package org.simantics.db;
 
+import java.util.function.Consumer;
+
 import org.simantics.db.exception.DatabaseException;
 import org.simantics.db.procedure.AsyncListener;
 import org.simantics.db.procedure.AsyncMultiListener;
@@ -35,7 +37,6 @@ import org.simantics.db.request.Write;
 import org.simantics.db.request.WriteOnly;
 import org.simantics.db.request.WriteOnlyResult;
 import org.simantics.db.request.WriteResult;
-import org.simantics.utils.datastructures.Callback;
 
 /**
  * 
@@ -472,13 +473,13 @@ public interface AsyncRequestProcessorSpecific extends ServiceLocator {
 
     /**
      * Asynchronously performs the given {@link Write}. The outcome of the
-     * request will be reported to given {@link Callback} in the form of a
+     * request will be reported to given {@link Consumer} in the form of a
      * DatabaseException raised during request processing or null upon success.
      * 
      * @param request an instance of {@link Write}.
-     * @param request an instance of {@link Callback}.
+     * @param request an instance of {@link Consumer}.
      */
-    void asyncRequest(Write request, Callback<DatabaseException> callback);
+    void asyncRequest(Write request, Consumer<DatabaseException> callback);
     
     <T> void asyncRequest(WriteResult<T> r, Procedure<T> procedure);
     
@@ -493,13 +494,13 @@ public interface AsyncRequestProcessorSpecific extends ServiceLocator {
 
     /**
      * Asynchronously performs the given {@link WriteOnly}. The outcome of the
-     * request will be reported to given {@link Callback} in the form of a
+     * request will be reported to given {@link Consumer} in the form of a
      * DatabaseException raised during request processing or null upon success.
      * 
      * @param request an instance of {@link WriteOnly}.
-     * @param request an instance of {@link Callback}.
+     * @param request an instance of {@link Consumer}.
      */
-    void asyncRequest(DelayedWrite request, Callback<DatabaseException> callback);
+    void asyncRequest(DelayedWrite request, Consumer<DatabaseException> callback);
 
     <T> void asyncRequest(DelayedWriteResult<T> r, Procedure<T> procedure);
 
@@ -513,13 +514,13 @@ public interface AsyncRequestProcessorSpecific extends ServiceLocator {
 
     /**
      * Asynchronously performs the given {@link WriteOnly}. The outcome of the
-     * request will be reported to given {@link Callback} in the form of a
+     * request will be reported to given {@link Consumer} in the form of a
      * DatabaseException raised during request processing or null upon success.
      * 
      * @param request an instance of {@link WriteOnly}.
-     * @param request an instance of {@link Callback}.
+     * @param request an instance of {@link Consumer}.
      */
-    void asyncRequest(WriteOnly r, Callback<DatabaseException> callback);
+    void asyncRequest(WriteOnly r, Consumer<DatabaseException> callback);
     
     <T> void asyncRequest(WriteOnlyResult<T> r, Procedure<T> procedure);