*******************************************************************************/
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;
import org.simantics.db.request.WriteOnly;
import org.simantics.db.request.WriteOnlyResult;
import org.simantics.db.request.WriteResult;
-import org.simantics.utils.datastructures.Callback;
/**
*
/**
* 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);
/**
* 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);
/**
* 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);