summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCaspar De Groot2009-12-28 05:23:52 (EST)
committerCaspar De Groot2009-12-28 05:23:52 (EST)
commitbb1a711dc08e9842f45bd8d5b1ff53348bce1405 (patch)
tree7dfc3dcd2e64b43ec78a6451fc88bbc2dab66f2d
parent6aaff2cb0368bd0e1c149dbf34537cb91c23b52e (diff)
downloadcdo-bb1a711dc08e9842f45bd8d5b1ff53348bce1405.zip
cdo-bb1a711dc08e9842f45bd8d5b1ff53348bce1405.tar.gz
cdo-bb1a711dc08e9842f45bd8d5b1ff53348bce1405.tar.bz2
[292375] CDO Server does not honor config settings for currentLRUCapacity and revisedLRUCapacity
https://bugs.eclipse.org/bugs/show_bug.cgi?id=292375
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/RevisionManager.java13
1 files changed, 11 insertions, 2 deletions
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/RevisionManager.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/RevisionManager.java
index 4e909de..ddfe19c 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/RevisionManager.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/RevisionManager.java
@@ -18,6 +18,7 @@ import org.eclipse.emf.cdo.common.model.CDOModelUtil;
import org.eclipse.emf.cdo.common.revision.cache.CDORevisionCache;
import org.eclipse.emf.cdo.internal.common.revision.CDORevisionResolverImpl;
import org.eclipse.emf.cdo.internal.common.revision.cache.lru.LRURevisionCache;
+import org.eclipse.emf.cdo.internal.common.revision.cache.two.TwoLevelRevisionCache;
import org.eclipse.emf.cdo.server.IRepository;
import org.eclipse.emf.cdo.server.IRevisionManager;
import org.eclipse.emf.cdo.server.IStoreAccessor;
@@ -303,12 +304,14 @@ public class RevisionManager extends CDORevisionResolverImpl implements IRevisio
protected void doBeforeActivate() throws Exception
{
super.doBeforeActivate();
+ applyLRUSettings(getCache());
+ }
- CDORevisionCache cache = getCache();
+ private void applyLRUSettings(CDORevisionCache cache)
+ {
if (cache instanceof LRURevisionCache)
{
LRURevisionCache lruCache = (LRURevisionCache)cache;
-
Integer currentLRUCapacity = getIntegerProperty(Props.CURRENT_LRU_CAPACITY);
if (currentLRUCapacity != null)
{
@@ -321,6 +324,12 @@ public class RevisionManager extends CDORevisionResolverImpl implements IRevisio
lruCache.setCapacityRevised(revisedLRUCapacity);
}
}
+ else if (cache instanceof TwoLevelRevisionCache)
+ {
+ TwoLevelRevisionCache twoLevelCache = (TwoLevelRevisionCache)cache;
+ applyLRUSettings(twoLevelCache.getLevel1());
+ applyLRUSettings(twoLevelCache.getLevel2());
+ }
}
private Integer getIntegerProperty(String key)