Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2008-10-29 05:22:09 -0400
committerEike Stepper2008-10-29 05:22:09 -0400
commit442dc24d75425b39c26105e50ab0330dcf3a283b (patch)
tree02217071cc6264c2712c489487ded2414492811b
parent39c1a0adce7a5fb9fba6e1b90223c71bed0f987b (diff)
downloadcdo-442dc24d75425b39c26105e50ab0330dcf3a283b.tar.gz
cdo-442dc24d75425b39c26105e50ab0330dcf3a283b.tar.xz
cdo-442dc24d75425b39c26105e50ab0330dcf3a283b.zip
[252362] session.refresh should not go through lock/thread invalidation
https://bugs.eclipse.org/bugs/show_bug.cgi?id=252362
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOSessionImpl.java35
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOViewImpl.java2
2 files changed, 22 insertions, 15 deletions
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOSessionImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOSessionImpl.java
index 1587cb07dc..9645fa4e10 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOSessionImpl.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOSessionImpl.java
@@ -660,7 +660,7 @@ public class CDOSessionImpl extends Container<CDOView> implements CDOSession, CD
{
if (isPassiveUpdateEnabled())
{
- notifyInvalidation(timeStamp, dirtyOIDs, detachedObjects, excludedView);
+ notifyInvalidation(timeStamp, dirtyOIDs, detachedObjects, excludedView, true);
}
handleChangeSubcription(deltas, detachedObjects, excludedView);
@@ -672,11 +672,11 @@ public class CDOSessionImpl extends Container<CDOView> implements CDOSession, CD
*/
public void handleSyncResponse(long timestamp, Set<CDOIDAndVersion> dirtyOIDs, Collection<CDOID> detachedObjects)
{
- notifyInvalidation(timestamp, dirtyOIDs, detachedObjects, null);
+ notifyInvalidation(timestamp, dirtyOIDs, detachedObjects, null, false);
}
private void notifyInvalidation(final long timeStamp, Set<CDOIDAndVersion> dirtyOIDs,
- Collection<CDOID> detachedObjects, CDOViewImpl excludedView)
+ Collection<CDOID> detachedObjects, CDOViewImpl excludedView, boolean async)
{
for (CDOIDAndVersion dirtyOID : dirtyOIDs)
{
@@ -713,21 +713,28 @@ public class CDOSessionImpl extends Container<CDOView> implements CDOSession, CD
{
if (view != excludedView)
{
- QueueRunner runner = getInvalidationRunner();
- runner.addWork(new Runnable()
+ if (async)
{
- public void run()
+ QueueRunner runner = getInvalidationRunner();
+ runner.addWork(new Runnable()
{
- try
+ public void run()
{
- view.handleInvalidation(timeStamp, finalDirtyOIDs, finalDetachedObjects);
+ try
+ {
+ view.handleInvalidation(timeStamp, finalDirtyOIDs, finalDetachedObjects);
+ }
+ catch (RuntimeException ex)
+ {
+ OM.LOG.error(ex);
+ }
}
- catch (RuntimeException ex)
- {
- OM.LOG.error(ex);
- }
- }
- });
+ });
+ }
+ else
+ {
+ view.handleInvalidation(timeStamp, finalDirtyOIDs, finalDetachedObjects);
+ }
}
}
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOViewImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOViewImpl.java
index b9aa30f2df..cf0596d880 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOViewImpl.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOViewImpl.java
@@ -1022,7 +1022,7 @@ public class CDOViewImpl extends org.eclipse.net4j.util.event.Notifier implement
* the caller of this method. Runtime exceptions from the implementation of the {@link CDOStateMachine} are propagated
* to the caller of this method but this should not happen in the absence of implementation errors.
* <p>
- * Note that this method can block for an uncertain time on the reentrant view lock!
+ * Note that this method can block for an uncertain amount of time on the reentrant view lock!
*
* @param timeStamp
* The time stamp of the server transaction if this event was sent as a result of a successfully committed

Back to the top