jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thom...@apache.org
Subject svn commit: r570040 - /jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/RepositoryImpl.java
Date Mon, 27 Aug 2007 08:44:15 GMT
Author: thomasm
Date: Mon Aug 27 01:44:15 2007
New Revision: 570040

URL: http://svn.apache.org/viewvc?rev=570040&view=rev
Log:
JCR-926: garbage collection implementation for the global data store

Modified:
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/RepositoryImpl.java

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/RepositoryImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/RepositoryImpl.java?rev=570040&r1=570039&r2=570040&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/RepositoryImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/RepositoryImpl.java
Mon Aug 27 01:44:15 2007
@@ -35,6 +35,8 @@
 import org.apache.jackrabbit.core.config.RepositoryConfig;
 import org.apache.jackrabbit.core.config.VersioningConfig;
 import org.apache.jackrabbit.core.config.WorkspaceConfig;
+import org.apache.jackrabbit.core.data.DataStore;
+import org.apache.jackrabbit.core.data.FileDataStore;
 import org.apache.jackrabbit.core.fs.BasedFileSystem;
 import org.apache.jackrabbit.core.fs.FileSystem;
 import org.apache.jackrabbit.core.fs.FileSystemException;
@@ -157,6 +159,11 @@
 
     // sub file system where the repository stores meta data such as uuid of root node, etc.
     private final FileSystem metaDataStore;
+    
+    /**
+     * Data store for binary properties.
+     */
+    private final DataStore dataStore;    
 
     /**
      * the delegating observation dispatcher for all workspaces
@@ -241,6 +248,8 @@
             throw new RepositoryException(msg, fse);
         }
         metaDataStore = new BasedFileSystem(repStore, fsRootPath);
+        dataStore =
+            new FileDataStore(new File(repConfig.getHomeDir(), "datastore"));        
 
         // init root node uuid
         rootNodeId = loadRootNodeId(metaDataStore);
@@ -321,6 +330,10 @@
 
         log.info("Repository started");
     }
+    
+    public DataStore getDataStore() {
+        return dataStore;
+    }    
 
     /**
      * Get the cache manager of this repository, useful
@@ -2023,6 +2036,13 @@
         public void lockEventsReady(String workspace) throws RepositoryException {
             // toggle the initialization of some workspace's lock manager
             getWorkspaceInfo(workspace).getLockManager();
+        }
+
+        /**
+         * {@inheritDoc}
+         */
+        public DataStore getDataStore() {
+            return RepositoryImpl.this.getDataStore();
         }
     }
 }



Mime
View raw message