jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r687321 - in /jackrabbit/trunk/jackrabbit-jcr2spi/src: main/java/org/apache/jackrabbit/jcr2spi/ main/java/org/apache/jackrabbit/jcr2spi/config/ test/java/org/apache/jackrabbit/jcr2spi/
Date Wed, 20 Aug 2008 13:21:41 GMT
Author: angela
Date: Wed Aug 20 06:21:40 2008
New Revision: 687321

URL: http://svn.apache.org/viewvc?rev=687321&view=rev
Log:
JCR-1720: configuration entry for size of ItemCache

Modified:
    jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/SessionImpl.java
    jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/config/RepositoryConfig.java
    jackrabbit/trunk/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/AbstractRepositoryConfig.java

Modified: jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/SessionImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/SessionImpl.java?rev=687321&r1=687320&r2=687321&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/SessionImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/SessionImpl.java
Wed Aug 20 06:21:40 2008
@@ -564,7 +564,7 @@
     }
 
     protected ItemManager createItemManager(HierarchyManager hierarchyManager) {
-        ItemCache cache = new ItemCacheImpl(1000); // TODO: make configurable
+        ItemCache cache = new ItemCacheImpl(config.getItemCacheSize());
         ItemManagerImpl imgr = new ItemManagerImpl(hierarchyManager, this, cache);
         return imgr;
     }
@@ -735,7 +735,7 @@
      * state for this session is retrieved.
      *
      * @param version
-     * @return
+     * @return the NodeState associated with the specified version.
      */
     NodeState getVersionState(Version version) throws RepositoryException {
         ItemState itemState;

Modified: jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/config/RepositoryConfig.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/config/RepositoryConfig.java?rev=687321&r1=687320&r2=687321&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/config/RepositoryConfig.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/config/RepositoryConfig.java
Wed Aug 20 06:21:40 2008
@@ -35,4 +35,6 @@
     public String getDefaultWorkspaceName();
 
     public CacheBehaviour getCacheBehaviour();
+
+    public int getItemCacheSize();
 }
\ No newline at end of file

Modified: jackrabbit/trunk/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/AbstractRepositoryConfig.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/AbstractRepositoryConfig.java?rev=687321&r1=687320&r2=687321&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/AbstractRepositoryConfig.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/AbstractRepositoryConfig.java
Wed Aug 20 06:21:40 2008
@@ -28,6 +28,8 @@
 
     private static Logger log = LoggerFactory.getLogger(AbstractRepositoryConfig.class);
 
+    private static final int DEFAULT_ITEM_CACHE_SIZE = 5000;
+
     public String getDefaultWorkspaceName() {
         return null;
     }
@@ -35,4 +37,8 @@
     public CacheBehaviour getCacheBehaviour() {
         return CacheBehaviour.INVALIDATE;
     }
+
+    public int getItemCacheSize() {
+        return DEFAULT_ITEM_CACHE_SIZE;
+    }
 }
\ No newline at end of file



Mime
View raw message