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/04/12 14:58:51 UTC
svn commit: r1738795 -
/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentMK.java
Author: reschke
Date: Tue Apr 12 12:58:51 2016
New Revision: 1738795
URL: http://svn.apache.org/viewvc?rev=1738795&view=rev
Log:
OAK-4190: DocumentMK: refactor RDB-specific code
Modified:
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentMK.java
Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentMK.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentMK.java?rev=1738795&r1=1738794&r2=1738795&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentMK.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentMK.java Tue Apr 12 12:58:51 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;
}