X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=bundles%2Forg.simantics.db.common%2Fsrc%2Forg%2Fsimantics%2Fdb%2Fcommon%2Futils%2FTransaction.java;h=96d915482e53b91efb9f5e536d7d0e0d480a3868;hb=d40b57f5d1cb14a5af0d7496fcce25e15493337d;hp=0a8dcea413295cdf1cd436d6a2b04995f4642b39;hpb=d33a5a61e2c056a3d48733819257890406ee9d52;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.db.common/src/org/simantics/db/common/utils/Transaction.java b/bundles/org.simantics.db.common/src/org/simantics/db/common/utils/Transaction.java index 0a8dcea41..96d915482 100644 --- a/bundles/org.simantics.db.common/src/org/simantics/db/common/utils/Transaction.java +++ b/bundles/org.simantics.db.common/src/org/simantics/db/common/utils/Transaction.java @@ -13,10 +13,12 @@ package org.simantics.db.common.utils; import java.util.Collection; import java.util.Set; import java.util.concurrent.Semaphore; +import java.util.function.Consumer; import org.simantics.databoard.accessor.Accessor; import org.simantics.databoard.binding.Binding; import org.simantics.databoard.type.Datatype; +import org.simantics.db.AsyncRequestProcessor; import org.simantics.db.ReadGraph; import org.simantics.db.RequestProcessor; import org.simantics.db.Resource; @@ -40,7 +42,6 @@ import org.simantics.db.procedure.Procedure; import org.simantics.db.request.DelayedWrite; import org.simantics.db.request.Read; import org.simantics.db.request.Write; -import org.simantics.utils.datastructures.Callback; /** * Synchronous Transaction.
@@ -150,11 +151,11 @@ public class Transaction {
}
}
- public static void startTransaction(RequestProcessor processor, boolean write) throws DatabaseException {
+ public static void startTransaction(AsyncRequestProcessor processor, boolean write) throws DatabaseException {
startTransaction(processor, write ? Type.WRITE : Type.READ);
}
- public static void startTransaction(RequestProcessor processor, Type type) throws DatabaseException {
+ public static void startTransaction(AsyncRequestProcessor processor, Type type) throws DatabaseException {
switch (type) {
case READ:
{
@@ -216,12 +217,9 @@ public class Transaction {
t.ts = new Semaphore(0);
transactions.set(t);
- Callback