jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1215206 - /jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/RepositoryServiceImpl.java
Date Fri, 16 Dec 2011 16:13:43 GMT
Author: mduerig
Date: Fri Dec 16 16:13:43 2011
New Revision: 1215206

URL: http://svn.apache.org/viewvc?rev=1215206&view=rev
Log:
Microkernel based Jackrabbit prototype (WIP)
introduce constant for chunk read size

Modified:
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/RepositoryServiceImpl.java

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/RepositoryServiceImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/RepositoryServiceImpl.java?rev=1215206&r1=1215205&r2=1215206&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/RepositoryServiceImpl.java
(original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/RepositoryServiceImpl.java
Fri Dec 16 16:13:43 2011
@@ -130,6 +130,7 @@ public class RepositoryServiceImpl exten
     private static final Logger log = LoggerFactory.getLogger(RepositoryServiceImpl.class);
 
     private static final long BINARY_VALUE_INLINE_THRESHOLD = 0x1000;
+    private static final int CHILD_NODE_CHUNK_SIZE = 512;
     private static final String DEFAULT_DEFAULT_WORKSPACE = "default";
     private static final String DEFAULT_SYSTEM_WORKSPACE = "system";
     private static final String DEFAULT_ANONYMOUS_ID = "anonymous";
@@ -339,7 +340,7 @@ public class RepositoryServiceImpl exten
                 throw new PathNotFoundException(itemPath.toString());
             }
 
-            String json = microKernel.getNodes(mkPath, rev, 1, 0, 512);
+            String json = microKernel.getNodes(mkPath, rev, 1, 0, CHILD_NODE_CHUNK_SIZE);
             return buildItemInfos(nodePath, itemPath, json, readFromDataStore);
         }
         catch (MicroKernelException e) {
@@ -361,8 +362,6 @@ public class RepositoryServiceImpl exten
             }
 
             return new Iterator<ChildInfo>() {
-                private static final int chunkSize = 512;
-
                 private int pos;
                 private Iterator<ChildInfo> currentChunk;
 
@@ -399,8 +398,8 @@ public class RepositoryServiceImpl exten
 
                 private void nextChunk() {
                     try {
-                        String json = microKernel.getNodes(mkPath, rev, 0, pos, chunkSize);
-                        pos += chunkSize;
+                        String json = microKernel.getNodes(mkPath, rev, 0, pos, CHILD_NODE_CHUNK_SIZE);
+                        pos += CHILD_NODE_CHUNK_SIZE;
                         Iterator<? extends ItemInfo> infos = buildItemInfos(path, path,
json, readFromDataStore);
                         NodeInfo info = (NodeInfo) infos.next();
                         currentChunk = info.getChildInfos();



Mime
View raw message