Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2008-10-14 13:37:48 -0400
committerEike Stepper2008-10-14 13:37:48 -0400
commit9cadba04ba44041cae1256901a6df7070c9d2fa8 (patch)
treecd5d2279fc7f87bedbf8afb62f498b08cff03be6
parent43ac671ddafb2d0e3d10d3998ff34a3d4d20ec3e (diff)
downloadcdo-9cadba04ba44041cae1256901a6df7070c9d2fa8.tar.gz
cdo-9cadba04ba44041cae1256901a6df7070c9d2fa8.tar.xz
cdo-9cadba04ba44041cae1256901a6df7070c9d2fa8.zip
[250817] Deadlock in LRURevisionCache
https://bugs.eclipse.org/bugs/show_bug.cgi?id=250817
-rw-r--r--plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/revision/cache/lru/DLRevisionList.java6
-rw-r--r--plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/revision/cache/lru/LRURevisionCache.java10
-rw-r--r--plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/revision/cache/lru/LRURevisionList.java4
3 files changed, 10 insertions, 10 deletions
diff --git a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/revision/cache/lru/DLRevisionList.java b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/revision/cache/lru/DLRevisionList.java
index 1c642df93c..dd8222078b 100644
--- a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/revision/cache/lru/DLRevisionList.java
+++ b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/revision/cache/lru/DLRevisionList.java
@@ -112,7 +112,7 @@ public class DLRevisionList extends DLRevisionHolder
}
}
- public synchronized void addHead(DLRevisionHolder holder)
+ public void addHead(DLRevisionHolder holder)
{
validateUnlink(holder);
@@ -125,7 +125,7 @@ public class DLRevisionList extends DLRevisionHolder
setDLHead(holder);
}
- public synchronized void addTail(DLRevisionHolder holder)
+ public void addTail(DLRevisionHolder holder)
{
validateUnlink(holder);
@@ -138,7 +138,7 @@ public class DLRevisionList extends DLRevisionHolder
setDLTail(holder);
}
- public synchronized void remove(DLRevisionHolder holder)
+ public void remove(DLRevisionHolder holder)
{
validateLink(holder);
diff --git a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/revision/cache/lru/LRURevisionCache.java b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/revision/cache/lru/LRURevisionCache.java
index 877c632502..d4f7708b81 100644
--- a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/revision/cache/lru/LRURevisionCache.java
+++ b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/revision/cache/lru/LRURevisionCache.java
@@ -100,7 +100,7 @@ public class LRURevisionCache extends Lifecycle implements CDORevisionCache
}
}
- public List<CDORevision> getRevisions()
+ public synchronized List<CDORevision> getRevisions()
{
List<CDORevision> currentRevisions = new ArrayList<CDORevision>();
for (RevisionHolder holder : revisions.values())
@@ -115,7 +115,7 @@ public class LRURevisionCache extends Lifecycle implements CDORevisionCache
return currentRevisions;
}
- public CDOClass getObjectType(CDOID id)
+ public synchronized CDOClass getObjectType(CDOID id)
{
RevisionHolder holder = getHolder(id);
if (holder == null)
@@ -168,7 +168,7 @@ public class LRURevisionCache extends Lifecycle implements CDORevisionCache
return null;
}
- public boolean addRevision(InternalCDORevision revision)
+ public synchronized boolean addRevision(InternalCDORevision revision)
{
if (TRACER.isEnabled())
{
@@ -245,7 +245,7 @@ public class LRURevisionCache extends Lifecycle implements CDORevisionCache
return lookupHolder != null;
}
- public CDOID getResourceID(String path, long timeStamp)
+ public synchronized CDOID getResourceID(String path, long timeStamp)
{
CDOID[] ids = getRevisionIDs();
for (CDOID id : ids)
@@ -325,7 +325,7 @@ public class LRURevisionCache extends Lifecycle implements CDORevisionCache
super.doDeactivate();
}
- public final RevisionHolder getHolder(CDOID id)
+ public final synchronized RevisionHolder getHolder(CDOID id)
{
return revisions.get(id);
}
diff --git a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/revision/cache/lru/LRURevisionList.java b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/revision/cache/lru/LRURevisionList.java
index 23478537a1..a56486f3da 100644
--- a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/revision/cache/lru/LRURevisionList.java
+++ b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/revision/cache/lru/LRURevisionList.java
@@ -33,14 +33,14 @@ public class LRURevisionList extends DLRevisionList
* Sets the capacity of LRU cache revisions. A value of zero disables eviction completely such that the cache will
* grow indefinetely.
*/
- public synchronized void capacity(int capacity)
+ public void capacity(int capacity)
{
this.capacity = capacity;
eviction();
}
@Override
- public synchronized void add(DLRevisionHolder holder)
+ public void add(DLRevisionHolder holder)
{
addHead(holder);
eviction();

Back to the top