You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-commits@jackrabbit.apache.org by re...@apache.org on 2016/05/13 12:31:36 UTC

svn commit: r1743667 - in /jackrabbit/oak/branches/1.4: ./ oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentMK.java

Author: reschke
Date: Fri May 13 12:31:36 2016
New Revision: 1743667

URL: http://svn.apache.org/viewvc?rev=1743667&view=rev
Log:
OAK-4190: DocumentMK: refactor RDB-specific code (ported to 1.4)

Modified:
    jackrabbit/oak/branches/1.4/   (props changed)
    jackrabbit/oak/branches/1.4/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentMK.java

Propchange: jackrabbit/oak/branches/1.4/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri May 13 12:31:36 2016
@@ -1,3 +1,3 @@
 /jackrabbit/oak/branches/1.0:1665962
-/jackrabbit/oak/trunk:1733615,1733875,1733913,1733929,1734230,1734254,1734279,1734941,1735052,1735405,1735484,1735549,1735564,1735588,1735622,1735638,1735919,1735983,1736176,1737309-1737310,1737334,1737349,1737998,1738004,1738775,1738833,1738950,1738957,1738963,1739894,1740116,1740971,1741032,1741339,1741343,1742520,1742888,1742916,1743097,1743172,1743343
+/jackrabbit/oak/trunk:1733615,1733875,1733913,1733929,1734230,1734254,1734279,1734941,1735052,1735405,1735484,1735549,1735564,1735588,1735622,1735638,1735919,1735983,1736176,1737309-1737310,1737334,1737349,1737998,1738004,1738775,1738795,1738833,1738950,1738957,1738963,1739894,1740116,1740971,1741032,1741339,1741343,1742520,1742888,1742916,1743097,1743172,1743343
 /jackrabbit/trunk:1345480

Modified: jackrabbit/oak/branches/1.4/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentMK.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/branches/1.4/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentMK.java?rev=1743667&r1=1743666&r2=1743667&view=diff
==============================================================================
--- jackrabbit/oak/branches/1.4/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentMK.java (original)
+++ jackrabbit/oak/branches/1.4/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentMK.java Fri May 13 12:31:36 2016
@@ -611,11 +611,7 @@ public class DocumentMK {
          * @return this
          */
         public Builder setRDBConnection(DataSource ds) {
-            this.documentStore = new RDBDocumentStore(ds, this);
-            if(this.blobStore == null) {
-                this.blobStore = new RDBBlobStore(ds);
-                configureBlobStore(blobStore);
-            }
+            setRDBConnection(ds, new RDBOptions());
             return this;
         }
 
@@ -635,25 +631,25 @@ public class DocumentMK {
         }
 
         /**
-         * Sets the persistent cache option.
+         * Sets a {@link DataSource}s to use for the RDB document and blob
+         * stores.
          *
          * @return this
          */
-        public Builder setPersistentCache(String persistentCache) {
-            this.persistentCacheURI = persistentCache;
+        public Builder setRDBConnection(DataSource documentStoreDataSource, DataSource blobStoreDataSource) {
+            this.documentStore = new RDBDocumentStore(documentStoreDataSource, this);
+            this.blobStore = new RDBBlobStore(blobStoreDataSource);
+            configureBlobStore(blobStore);
             return this;
         }
 
         /**
-         * Sets a {@link DataSource}s to use for the RDB document and blob
-         * stores.
+         * Sets the persistent cache option.
          *
          * @return this
          */
-        public Builder setRDBConnection(DataSource documentStoreDataSource, DataSource blobStoreDataSource) {
-            this.documentStore = new RDBDocumentStore(documentStoreDataSource, this);
-            this.blobStore = new RDBBlobStore(blobStoreDataSource);
-            configureBlobStore(blobStore);
+        public Builder setPersistentCache(String persistentCache) {
+            this.persistentCacheURI = persistentCache;
             return this;
         }