[exo-jcr-commits] exo-jcr SVN: r1329 - in jcr/branches/1.12.0-OPT/exo.jcr.component.core/src: main/java/org/exoplatform/services/jcr/impl/core and 2 other directories.

do-not-reply at jboss.org do-not-reply at jboss.org
Fri Jan 8 11:58:26 EST 2010


Author: pnedonosko
Date: 2010-01-08 11:58:25 -0500 (Fri, 08 Jan 2010)
New Revision: 1329

Modified:
   jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/config/WorkspaceEntry.java
   jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionImpl.java
   jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/resources/binding.xml
   jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/test/resources/conf/standalone/test-jcr-config.xml
Log:
EXOJCR-338 lazy load for childs config

Modified: jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/config/WorkspaceEntry.java
===================================================================
--- jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/config/WorkspaceEntry.java	2010-01-08 16:35:29 UTC (rev 1328)
+++ jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/config/WorkspaceEntry.java	2010-01-08 16:58:25 UTC (rev 1329)
@@ -30,7 +30,7 @@
 
    protected String name;
    
-   protected int lazyReadThreshold = 0;
+   protected long lazyReadThreshold;
 
    @Deprecated
    protected String autoInitializedRootNt;
@@ -195,12 +195,12 @@
       this.initializer = initializer;
    }
    
-   public int getLazyReadThreshold()
+   public long getLazyReadThreshold()
    {
       return lazyReadThreshold;
    }
 
-   public void setLazyReadThreshold(int lazyReadThreshold)
+   public void setLazyReadThreshold(long lazyReadThreshold)
    {
       this.lazyReadThreshold = lazyReadThreshold;
    }   

Modified: jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionImpl.java
===================================================================
--- jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionImpl.java	2010-01-08 16:35:29 UTC (rev 1328)
+++ jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionImpl.java	2010-01-08 16:58:25 UTC (rev 1329)
@@ -160,7 +160,7 @@
       WorkspaceEntry wsConfig = (WorkspaceEntry)container.getComponentInstanceOfType(WorkspaceEntry.class);
 
       this.lazyReadThreshold =
-         wsConfig.getLazyReadThreshold() > 0 ? wsConfig.getLazyReadThreshold() : DEFAULT_LAZY_READ_THRESHOLD;
+         wsConfig.getLazyReadThreshold() > 0 ? (int) wsConfig.getLazyReadThreshold() : DEFAULT_LAZY_READ_THRESHOLD;
 
       WorkspaceFileCleanerHolder cleanerHolder =
          (WorkspaceFileCleanerHolder)container.getComponentInstanceOfType(WorkspaceFileCleanerHolder.class);

Modified: jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/resources/binding.xml
===================================================================
--- jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/resources/binding.xml	2010-01-08 16:35:29 UTC (rev 1328)
+++ jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/main/resources/binding.xml	2010-01-08 16:58:25 UTC (rev 1329)
@@ -21,10 +21,10 @@
 
   <mapping name="workspace" class="org.exoplatform.services.jcr.config.WorkspaceEntry">
     <value name="name" field="name" style="attribute" />
+    <value name="lazy-read-threshold" field="lazyReadThreshold" style="attribute" 
+        deserializer="org.exoplatform.services.jcr.util.ConfigurationFormat.parseLong" usage="optional" />
     <value name="auto-init-root-nodetype" field="autoInitializedRootNt" style="attribute" usage="optional" />
     <value name="auto-init-permissions" field="autoInitPermissions" style="attribute" usage="optional" />
-    <value name="lazy-read-threshold" field="lazyReadThreshold" usage="optional" />
-    
     <structure name="container" field="container">
       <value name="class" field="type" style="attribute" />
       <collection name="properties" field="parameters" usage="optional"

Modified: jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/test/resources/conf/standalone/test-jcr-config.xml
===================================================================
--- jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/test/resources/conf/standalone/test-jcr-config.xml	2010-01-08 16:35:29 UTC (rev 1328)
+++ jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/test/resources/conf/standalone/test-jcr-config.xml	2010-01-08 16:58:25 UTC (rev 1329)
@@ -28,7 +28,7 @@
          <session-max-age>1h</session-max-age>
          <authentication-policy>org.exoplatform.services.jcr.impl.core.access.JAASAuthenticator</authentication-policy>
          <workspaces>
-            <workspace name="ws">
+            <workspace name="ws" lazy-read-threshold="2000">
                <!-- for system storage -->
                <container class="org.exoplatform.services.jcr.impl.storage.jdbc.JDBCWorkspaceDataContainer">
                   <properties>



More information about the exo-jcr-commits mailing list