X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.db.procore%2Fsrc%2Ffi%2Fvtt%2Fsimantics%2Fprocore%2Finternal%2FState.java;fp=bundles%2Forg.simantics.db.procore%2Fsrc%2Ffi%2Fvtt%2Fsimantics%2Fprocore%2Finternal%2FState.java;h=4c6e77b1a94729c0274078ef5318ffcf30a51f36;hp=e0d8eee8a3ddb9d304d6b0109b752e66d0ca46f1;hb=0db1af75cd14f99f16c42c920562708abf37be93;hpb=b000e272429e157638c0384878b07b8dcd758472 diff --git a/bundles/org.simantics.db.procore/src/fi/vtt/simantics/procore/internal/State.java b/bundles/org.simantics.db.procore/src/fi/vtt/simantics/procore/internal/State.java index e0d8eee8a..4c6e77b1a 100644 --- a/bundles/org.simantics.db.procore/src/fi/vtt/simantics/procore/internal/State.java +++ b/bundles/org.simantics.db.procore/src/fi/vtt/simantics/procore/internal/State.java @@ -194,7 +194,7 @@ class State { void stopReadTransaction() throws DatabaseException { lock.lock(); try { - assert (!queryProvider.hasScheduledUpdates()); + assert (!queryProvider.listening.hasScheduledUpdates()); assert (readCount == 1); session.writeSupport.gc(); transactionToken.stopReadTransaction(); @@ -290,16 +290,16 @@ class State { throw new InternalException("Cancel failed. This should never happen."); // System.out.println("session cs: " + session.clientChanges); // System.out.println("reverse cs: " + cs); - queryProvider.performDirtyUpdates(graph); - queryProvider.performScheduledUpdates(graph); + queryProvider.propagateChangesInQueryCache(graph); + queryProvider.listening.fireListeners(graph); } catch (DatabaseException e) { Logger.defaultLogError(e); } // This will send and accept the reverse change set. transactionToken.cancelEnd(session.writeSupport, null, session.clusterStream); } else { - queryProvider.performDirtyUpdates(graph); - queryProvider.performScheduledUpdates(graph); + queryProvider.propagateChangesInQueryCache(graph); + queryProvider.listening.fireListeners(graph); } } session.writeSupport.clearMetadata(); @@ -339,15 +339,16 @@ class State { // start = System.nanoTime(); - queryProvider.performScheduledUpdates(graph); + queryProvider.propagateChangesInQueryCache(graph); + queryProvider.listening.fireListeners(graph); // duration = System.nanoTime() - start; // System.out.println("performScheduledUpdates " + 1e-9*duration + "s. "); // Process updates as long as pending primitives exist while (session.dirtyPrimitives) { session.dirtyPrimitives = false; - queryProvider.performDirtyUpdates(graph); - queryProvider.performScheduledUpdates(graph); + queryProvider.propagateChangesInQueryCache(graph); + queryProvider.listening.fireListeners(graph); } if (!writeOnly) // TODO: fix me! FIX ME! Please fix me! Please!