X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;ds=inline;f=bundles%2Forg.simantics.db%2Fsrc%2Forg%2Fsimantics%2Fdb%2Fservice%2FQueryControl.java;h=a8c7286437aa4b1d08c619926a05b8d986eec5b0;hb=195c63dd5c7600170f594750de96793ebf06a0ad;hp=5cc3fa65589cadbd71ade1236e4db2899cf8e28c;hpb=0ae2b770234dfc3cbb18bd38f324125cf0faca07;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.db/src/org/simantics/db/service/QueryControl.java b/bundles/org.simantics.db/src/org/simantics/db/service/QueryControl.java index 5cc3fa655..a8c728643 100644 --- a/bundles/org.simantics.db/src/org/simantics/db/service/QueryControl.java +++ b/bundles/org.simantics.db/src/org/simantics/db/service/QueryControl.java @@ -17,9 +17,11 @@ import org.simantics.db.AsyncReadGraph; import org.simantics.db.ReadGraph; import org.simantics.db.Resource; import org.simantics.db.WriteGraph; +import org.simantics.db.exception.DatabaseException; import org.simantics.db.procedure.AsyncContextMultiProcedure; import org.simantics.db.procedure.AsyncMultiProcedure; import org.simantics.db.request.ExternalRead; +import org.simantics.db.request.Read; /** @@ -74,7 +76,7 @@ public interface QueryControl { int getGraphThread(AsyncReadGraph graph); - boolean resume(AsyncReadGraph graph); + boolean resume(ReadGraph graph); void schedule(AsyncReadGraph graph, int targetThread, ControlProcedure procedure); @@ -87,12 +89,25 @@ public interface QueryControl { * performed with the specified ReadGraph. DB listeners are therefore not * triggered by anything that is performed with the returned ReadGraph. * + * @Deprecated In favor of syncRequestIndependent * @param graph read transaction handle to clone for listener-independent * use * @return read transaction handle that is independent of the requests * performed with the parameter */ ReadGraph getIndependentGraph(ReadGraph graph); + + /** + * Performs the given request without accumulating query dependencies. + * DB listeners are therefore not triggered by anything that is performed within the request. + * + * @param graph read transaction handle to clone for listener-independent + * use + * @param request the request to perform + * @return the result of the request evaluation + */ + T syncRequestIndependent(ReadGraph graph, Read request) throws DatabaseException; + boolean hasParentRequest(ReadGraph graph); }