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 ch...@apache.org on 2017/10/12 11:08:51 UTC
svn commit: r1811939 - in
/jackrabbit/oak/trunk/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document:
Configuration.java DocumentNodeStoreService.java
Author: chetanm
Date: Thu Oct 12 11:08:51 2017
New Revision: 1811939
URL: http://svn.apache.org/viewvc?rev=1811939&view=rev
Log:
OAK-6819 - Move Configuration out of DocumentNodeStoreService
Added:
jackrabbit/oak/trunk/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/Configuration.java (with props)
Modified:
jackrabbit/oak/trunk/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStoreService.java
Added: jackrabbit/oak/trunk/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/Configuration.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/Configuration.java?rev=1811939&view=auto
==============================================================================
--- jackrabbit/oak/trunk/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/Configuration.java (added)
+++ jackrabbit/oak/trunk/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/Configuration.java Thu Oct 12 11:08:51 2017
@@ -0,0 +1,219 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.jackrabbit.oak.plugins.document;
+
+import org.osgi.service.metatype.annotations.AttributeDefinition;
+import org.osgi.service.metatype.annotations.ObjectClassDefinition;
+import org.osgi.service.metatype.annotations.Option;
+
+import static org.apache.jackrabbit.oak.plugins.document.DocumentMK.Builder.DEFAULT_CACHE_SEGMENT_COUNT;
+import static org.apache.jackrabbit.oak.plugins.document.DocumentMK.Builder.DEFAULT_CACHE_STACK_MOVE_DISTANCE;
+import static org.apache.jackrabbit.oak.plugins.document.DocumentMK.Builder.DEFAULT_CHILDREN_CACHE_PERCENTAGE;
+import static org.apache.jackrabbit.oak.plugins.document.DocumentMK.Builder.DEFAULT_DIFF_CACHE_PERCENTAGE;
+import static org.apache.jackrabbit.oak.plugins.document.DocumentMK.Builder.DEFAULT_NODE_CACHE_PERCENTAGE;
+import static org.apache.jackrabbit.oak.plugins.document.DocumentMK.Builder.DEFAULT_PREV_DOC_CACHE_PERCENTAGE;
+
+@ObjectClassDefinition(
+ name = "Apache Jackrabbit Oak Document NodeStore Service",
+ description = "NodeStore implementation based on Document model. For configuration option refer " +
+ "to http://jackrabbit.apache.org/oak/docs/osgi_config.html#DocumentNodeStore. Note that for system " +
+ "stability purpose it is advisable to not change these settings at runtime. Instead the config change " +
+ "should be done via file system based config file and this view should ONLY be used to determine which " +
+ "options are supported")
+@interface Configuration {
+ @AttributeDefinition(
+ name = "Mongo URI",
+ description = "Mongo connection URI used to connect to Mongo. Refer to " +
+ "http://docs.mongodb.org/manual/reference/connection-string/ for details. Note that this value " +
+ "can be overridden via framework property 'oak.mongo.uri'")
+ String mongouri() default DocumentNodeStoreService.DEFAULT_URI;
+
+ @AttributeDefinition(
+ name = "Mongo DB name",
+ description = "Name of the database in Mongo. Note that this value " +
+ "can be overridden via framework property 'oak.mongo.db'")
+ String db() default DocumentNodeStoreService.DEFAULT_DB;
+
+
+ @AttributeDefinition(
+ name = "MongoDB socket keep-alive option",
+ description = "Whether socket keep-alive should be enabled for " +
+ "connections to MongoDB. Note that this value can be " +
+ "overridden via framework property 'oak.mongo.socketKeepAlive'")
+ boolean socketKeepAlive() default DocumentNodeStoreService.DEFAULT_SO_KEEP_ALIVE;
+
+ @AttributeDefinition(
+ name = "Cache Size (in MB)",
+ description = "Cache size in MB. This is distributed among various caches used in DocumentNodeStore")
+ int cache() default DocumentNodeStoreService.DEFAULT_CACHE;
+
+ @AttributeDefinition(
+ name = "NodeState Cache",
+ description = "Percentage of cache to be allocated towards Node cache")
+ int nodeCachePercentage() default DEFAULT_NODE_CACHE_PERCENTAGE;
+
+ @AttributeDefinition(
+ name = "PreviousDocument Cache",
+ description = "Percentage of cache to be allocated towards Previous Document cache")
+ int prevDocCachePercentage() default DEFAULT_PREV_DOC_CACHE_PERCENTAGE;
+
+ @AttributeDefinition(
+ name = "NodeState Children Cache",
+ description = "Percentage of cache to be allocated towards Children cache")
+ int childrenCachePercentage() default DEFAULT_CHILDREN_CACHE_PERCENTAGE;
+
+ @AttributeDefinition(
+ name = "Diff Cache",
+ description = "Percentage of cache to be allocated towards Diff cache")
+ int diffCachePercentage() default DEFAULT_DIFF_CACHE_PERCENTAGE;
+
+ @AttributeDefinition(
+ name = "LIRS Cache Segment Count",
+ description = "The number of segments in the LIRS cache " +
+ "(default 16, a higher count means higher concurrency " +
+ "but slightly lower cache hit rate)")
+ int cacheSegmentCount() default DEFAULT_CACHE_SEGMENT_COUNT;
+
+ @AttributeDefinition(
+ name = "LIRS Cache Stack Move Distance",
+ description = "The delay to move entries to the head of the queue " +
+ "in the LIRS cache " +
+ "(default 16, a higher value means higher concurrency " +
+ "but slightly lower cache hit rate)")
+ int cacheStackMoveDistance() default DEFAULT_CACHE_STACK_MOVE_DISTANCE;
+
+ @AttributeDefinition(
+ name = "Blob Cache Size (in MB)",
+ description = "Cache size to store blobs in memory. Used only with default BlobStore " +
+ "(as per DocumentStore type)")
+ int blobCacheSize() default DocumentNodeStoreService.DEFAULT_BLOB_CACHE_SIZE;
+
+ @AttributeDefinition(
+ name = "Persistent Cache Config",
+ description = "Configuration for persistent cache. Refer to " +
+ "http://jackrabbit.apache.org/oak/docs/nodestore/persistent-cache.html for various options")
+ String persistentCache() default DocumentNodeStoreService.DEFAULT_PERSISTENT_CACHE;
+
+ @AttributeDefinition(
+ name = "Journal Cache Config",
+ description = "Configuration for journal cache. Refer to " +
+ "http://jackrabbit.apache.org/oak/docs/nodestore/persistent-cache.html for various options")
+ String journalCache() default DocumentNodeStoreService.DEFAULT_JOURNAL_CACHE;
+
+ @AttributeDefinition(
+ name = "Custom BlobStore",
+ description = "Boolean value indicating that a custom BlobStore is to be used. " +
+ "By default, for MongoDB, MongoBlobStore is used; for RDB, RDBBlobStore is used.")
+ boolean customBlobStore() default false;
+
+
+ @AttributeDefinition(
+ name = "Journal Garbage Collection Interval (millis)",
+ description = "Long value indicating interval (in milliseconds) with which the "
+ + "journal (for external changes) is cleaned up. Default is " + DocumentNodeStoreService.DEFAULT_JOURNAL_GC_INTERVAL_MILLIS)
+ long journalGCInterval() default DocumentNodeStoreService.DEFAULT_JOURNAL_GC_INTERVAL_MILLIS;
+
+ @AttributeDefinition(
+ name = "Maximum Age of Journal Entries (millis)",
+ description = "Long value indicating max age (in milliseconds) that "
+ + "journal (for external changes) entries are kept (older ones are candidates for gc). "
+ + "Default is " + DocumentNodeStoreService.DEFAULT_JOURNAL_GC_MAX_AGE_MILLIS)
+ long journalGCMaxAge() default DocumentNodeStoreService.DEFAULT_JOURNAL_GC_MAX_AGE_MILLIS;
+
+ @AttributeDefinition(
+ name = "Pre-fetch external changes",
+ description = "Boolean value indicating if external changes should " +
+ "be pre-fetched in a background thread.")
+ boolean prefetchExternalChanges() default false;
+
+ @AttributeDefinition(
+ name = "NodeStoreProvider role",
+ description = "Property indicating that this component will not register as a NodeStore but as a " +
+ "NodeStoreProvider with given role")
+ String role();
+
+ @AttributeDefinition(
+ name = "Version GC Max Age (in secs)",
+ description = "Version Garbage Collector (GC) logic will only consider those deleted for GC which " +
+ "are not accessed recently (currentTime - lastModifiedTime > versionGcMaxAgeInSecs). For " +
+ "example as per default only those document which have been *marked* deleted 24 hrs ago will be " +
+ "considered for GC. This also applies how older revision of live document are GC.")
+ long versionGcMaxAgeInSecs() default DocumentNodeStoreService.DEFAULT_VER_GC_MAX_AGE;
+
+ @AttributeDefinition(
+ name = "Continuous Version GC Mode",
+ description = "Run Version GC continuously as a background task.")
+ boolean versionGCContinuous() default DocumentNodeStoreService.DEFAULT_CONTINUOUS_RGC;
+
+ @AttributeDefinition(
+ name = "Blob GC Max Age (in secs)",
+ description = "Blob Garbage Collector (GC) logic will only consider those blobs for GC which " +
+ "are not accessed recently (currentTime - lastModifiedTime > blobGcMaxAgeInSecs). For " +
+ "example as per default only those blobs which have been created 24 hrs ago will be " +
+ "considered for GC")
+ long blobGcMaxAgeInSecs() default DocumentNodeStoreService.DEFAULT_BLOB_GC_MAX_AGE;
+
+ @AttributeDefinition(
+ name = "Blob tracking snapshot interval (in secs)",
+ description = "This is the default interval in which the snapshots of locally tracked blob ids will"
+ + "be taken and synchronized with the blob store. This should be configured to be less than the "
+ + "frequency of blob GC so that deletions during blob GC can be accounted for "
+ + "in the next GC execution.")
+ long blobTrackSnapshotIntervalInSecs() default DocumentNodeStoreService.DEFAULT_BLOB_SNAPSHOT_INTERVAL;
+
+ @AttributeDefinition(
+ name = "Root directory",
+ description = "Root directory for local tracking of blob ids. This service " +
+ "will first lookup the 'repository.home' framework property and " +
+ "then a component context property with the same name. If none " +
+ "of them is defined, a sub directory 'repository' relative to " +
+ "the current working directory is used.")
+ String repository_home();
+
+ @AttributeDefinition(
+ name = "Max Replication Lag (in secs)",
+ description = "Value in seconds. Determines the duration beyond which it can be safely assumed " +
+ "that the state on the secondaries is consistent with the primary, and it is safe to read from them")
+ long maxReplicationLagInSecs() default DocumentNodeStoreService.DEFAULT_MAX_REPLICATION_LAG;
+
+ @AttributeDefinition(
+ name = "DocumentStore Type",
+ description = "Type of DocumentStore to use for persistence. Defaults to MONGO",
+ options = {
+ @Option(label = "MONGO", value = "MONGO"),
+ @Option(label = "RDB", value = "RDB")})
+ String documentStoreType() default "MONGO";
+
+ @AttributeDefinition(
+ name = "Bundling Disabled",
+ description = "Boolean value indicating that Node bundling is disabled")
+ boolean bundlingDisabled() default DocumentNodeStoreService.DEFAULT_BUNDLING_DISABLED;
+
+ @AttributeDefinition(
+ name = "DocumentNodeStore update.limit",
+ description = "Number of content updates that need to happen before " +
+ "the updates are automatically purged to the private branch.")
+ int updateLimit();
+
+ @AttributeDefinition(
+ name = "Persistent Cache Includes",
+ description = "Paths which should be cached in persistent cache")
+ String[] persistentCacheIncludes() default {"/"};
+}
Propchange: jackrabbit/oak/trunk/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/Configuration.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: jackrabbit/oak/trunk/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStoreService.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStoreService.java?rev=1811939&r1=1811938&r2=1811939&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStoreService.java (original)
+++ jackrabbit/oak/trunk/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStoreService.java Thu Oct 12 11:08:51 2017
@@ -32,7 +32,6 @@ import static org.apache.jackrabbit.oak.
import static org.apache.jackrabbit.oak.plugins.document.DocumentMK.Builder.DEFAULT_DIFF_CACHE_PERCENTAGE;
import static org.apache.jackrabbit.oak.plugins.document.DocumentMK.Builder.DEFAULT_MEMORY_CACHE_SIZE;
import static org.apache.jackrabbit.oak.plugins.document.DocumentMK.Builder.DEFAULT_NODE_CACHE_PERCENTAGE;
-import static org.apache.jackrabbit.oak.plugins.document.DocumentMK.Builder.DEFAULT_PREV_DOC_CACHE_PERCENTAGE;
import static org.apache.jackrabbit.oak.plugins.document.NodeDocument.MODIFIED_IN_SECS_RESOLUTION;
import static org.apache.jackrabbit.oak.spi.blob.osgi.SplitBlobStoreService.ONLY_STANDALONE_TARGET;
import static org.apache.jackrabbit.oak.spi.whiteboard.WhiteboardUtils.registerMBean;
@@ -121,10 +120,7 @@ import org.osgi.service.component.annota
import org.osgi.service.component.annotations.Reference;
import org.osgi.service.component.annotations.ReferenceCardinality;
import org.osgi.service.component.annotations.ReferencePolicy;
-import org.osgi.service.metatype.annotations.AttributeDefinition;
import org.osgi.service.metatype.annotations.Designate;
-import org.osgi.service.metatype.annotations.ObjectClassDefinition;
-import org.osgi.service.metatype.annotations.Option;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -134,41 +130,41 @@ import org.slf4j.LoggerFactory;
@Component(
configurationPolicy = ConfigurationPolicy.REQUIRE,
service = {})
-@Designate(ocd = DocumentNodeStoreService.Configuration.class)
+@Designate(ocd = Configuration.class)
public class DocumentNodeStoreService {
private static final long MB = 1024 * 1024;
- private static final String DEFAULT_URI = "mongodb://localhost:27017/oak";
- private static final int DEFAULT_CACHE = (int) (DEFAULT_MEMORY_CACHE_SIZE / MB);
- private static final int DEFAULT_BLOB_CACHE_SIZE = 16;
- private static final String DEFAULT_DB = "oak";
- private static final boolean DEFAULT_SO_KEEP_ALIVE = false;
- private static final String DEFAULT_PERSISTENT_CACHE = "cache,binary=0";
- private static final String DEFAULT_JOURNAL_CACHE = "diff-cache";
- private static final boolean DEFAULT_CONTINUOUS_RGC = false;
+ static final String DEFAULT_URI = "mongodb://localhost:27017/oak";
+ static final int DEFAULT_CACHE = (int) (DEFAULT_MEMORY_CACHE_SIZE / MB);
+ static final int DEFAULT_BLOB_CACHE_SIZE = 16;
+ static final String DEFAULT_DB = "oak";
+ static final boolean DEFAULT_SO_KEEP_ALIVE = false;
+ static final String DEFAULT_PERSISTENT_CACHE = "cache,binary=0";
+ static final String DEFAULT_JOURNAL_CACHE = "diff-cache";
+ static final boolean DEFAULT_CONTINUOUS_RGC = false;
private static final String PREFIX = "oak.documentstore.";
private static final String DESCRIPTION = "oak.nodestore.description";
- private static final long DEFAULT_JOURNAL_GC_INTERVAL_MILLIS = 5*60*1000; // default is 5min
+ static final long DEFAULT_JOURNAL_GC_INTERVAL_MILLIS = 5*60*1000; // default is 5min
static final long DEFAULT_JOURNAL_GC_MAX_AGE_MILLIS = 24*60*60*1000; // default is 24hours
private static final String DEFAULT_PROP_HOME = "./repository";
- private static final long DEFAULT_MAX_REPLICATION_LAG = 6 * 60 * 60;
- private static final boolean DEFAULT_BUNDLING_DISABLED = false;
+ static final long DEFAULT_MAX_REPLICATION_LAG = 6 * 60 * 60;
+ static final boolean DEFAULT_BUNDLING_DISABLED = false;
/**
* Revisions older than this time would be garbage collected
*/
- private static final long DEFAULT_VER_GC_MAX_AGE = 24 * 60 * 60; //TimeUnit.DAYS.toSeconds(1);
+ static final long DEFAULT_VER_GC_MAX_AGE = 24 * 60 * 60; //TimeUnit.DAYS.toSeconds(1);
/**
* Blob modified before this time duration would be considered for Blob GC
*/
- private static final long DEFAULT_BLOB_GC_MAX_AGE = 24 * 60 * 60;
+ static final long DEFAULT_BLOB_GC_MAX_AGE = 24 * 60 * 60;
/**
* Default interval for taking snapshots of locally tracked blob ids.
*/
- private static final long DEFAULT_BLOB_SNAPSHOT_INTERVAL = 12 * 60 * 60;
+ static final long DEFAULT_BLOB_SNAPSHOT_INTERVAL = 12 * 60 * 60;
/**
* Name of framework property to configure Mongo Connection URI
@@ -187,194 +183,6 @@ public class DocumentNodeStoreService {
private static final String FWK_PROP_SO_KEEP_ALIVE = "oak.mongo.socketKeepAlive";
- @ObjectClassDefinition(
- name = "Apache Jackrabbit Oak Document NodeStore Service",
- description = "NodeStore implementation based on Document model. For configuration option refer " +
- "to http://jackrabbit.apache.org/oak/docs/osgi_config.html#DocumentNodeStore. Note that for system " +
- "stability purpose it is advisable to not change these settings at runtime. Instead the config change " +
- "should be done via file system based config file and this view should ONLY be used to determine which " +
- "options are supported")
- @interface Configuration {
- @AttributeDefinition(
- name = "Mongo URI",
- description = "Mongo connection URI used to connect to Mongo. Refer to " +
- "http://docs.mongodb.org/manual/reference/connection-string/ for details. Note that this value " +
- "can be overridden via framework property 'oak.mongo.uri'")
- String mongouri() default DEFAULT_URI;
-
- @AttributeDefinition(
- name = "Mongo DB name",
- description = "Name of the database in Mongo. Note that this value " +
- "can be overridden via framework property 'oak.mongo.db'")
- String db() default DEFAULT_DB;
-
-
- @AttributeDefinition(
- name = "MongoDB socket keep-alive option",
- description = "Whether socket keep-alive should be enabled for " +
- "connections to MongoDB. Note that this value can be " +
- "overridden via framework property 'oak.mongo.socketKeepAlive'")
- boolean socketKeepAlive() default DEFAULT_SO_KEEP_ALIVE;
-
- @AttributeDefinition(
- name = "Cache Size (in MB)",
- description = "Cache size in MB. This is distributed among various caches used in DocumentNodeStore")
- int cache() default DEFAULT_CACHE;
-
- @AttributeDefinition(
- name = "NodeState Cache",
- description = "Percentage of cache to be allocated towards Node cache")
- int nodeCachePercentage() default DEFAULT_NODE_CACHE_PERCENTAGE;
-
- @AttributeDefinition(
- name = "PreviousDocument Cache",
- description = "Percentage of cache to be allocated towards Previous Document cache")
- int prevDocCachePercentage() default DEFAULT_PREV_DOC_CACHE_PERCENTAGE;
-
- @AttributeDefinition(
- name = "NodeState Children Cache",
- description = "Percentage of cache to be allocated towards Children cache")
- int childrenCachePercentage() default DEFAULT_CHILDREN_CACHE_PERCENTAGE;
-
- @AttributeDefinition(
- name = "Diff Cache",
- description = "Percentage of cache to be allocated towards Diff cache")
- int diffCachePercentage() default DEFAULT_DIFF_CACHE_PERCENTAGE;
-
- @AttributeDefinition(
- name = "LIRS Cache Segment Count",
- description = "The number of segments in the LIRS cache " +
- "(default 16, a higher count means higher concurrency " +
- "but slightly lower cache hit rate)")
- int cacheSegmentCount() default DEFAULT_CACHE_SEGMENT_COUNT;
-
- @AttributeDefinition(
- name = "LIRS Cache Stack Move Distance",
- description = "The delay to move entries to the head of the queue " +
- "in the LIRS cache " +
- "(default 16, a higher value means higher concurrency " +
- "but slightly lower cache hit rate)")
- int cacheStackMoveDistance() default DEFAULT_CACHE_STACK_MOVE_DISTANCE;
-
- @AttributeDefinition(
- name = "Blob Cache Size (in MB)",
- description = "Cache size to store blobs in memory. Used only with default BlobStore " +
- "(as per DocumentStore type)")
- int blobCacheSize() default DEFAULT_BLOB_CACHE_SIZE;
-
- @AttributeDefinition(
- name = "Persistent Cache Config",
- description = "Configuration for persistent cache. Refer to " +
- "http://jackrabbit.apache.org/oak/docs/nodestore/persistent-cache.html for various options")
- String persistentCache() default DEFAULT_PERSISTENT_CACHE;
-
- @AttributeDefinition(
- name = "Journal Cache Config",
- description = "Configuration for journal cache. Refer to " +
- "http://jackrabbit.apache.org/oak/docs/nodestore/persistent-cache.html for various options")
- String journalCache() default DEFAULT_JOURNAL_CACHE;
-
- @AttributeDefinition(
- name = "Custom BlobStore",
- description = "Boolean value indicating that a custom BlobStore is to be used. " +
- "By default, for MongoDB, MongoBlobStore is used; for RDB, RDBBlobStore is used.")
- boolean customBlobStore() default false;
-
-
- @AttributeDefinition(
- name = "Journal Garbage Collection Interval (millis)",
- description = "Long value indicating interval (in milliseconds) with which the "
- + "journal (for external changes) is cleaned up. Default is " + DEFAULT_JOURNAL_GC_INTERVAL_MILLIS)
- long journalGCInterval() default DEFAULT_JOURNAL_GC_INTERVAL_MILLIS;
-
- @AttributeDefinition(
- name = "Maximum Age of Journal Entries (millis)",
- description = "Long value indicating max age (in milliseconds) that "
- + "journal (for external changes) entries are kept (older ones are candidates for gc). "
- + "Default is " + DEFAULT_JOURNAL_GC_MAX_AGE_MILLIS)
- long journalGCMaxAge() default DEFAULT_JOURNAL_GC_MAX_AGE_MILLIS;
-
- @AttributeDefinition(
- name = "Pre-fetch external changes",
- description = "Boolean value indicating if external changes should " +
- "be pre-fetched in a background thread.")
- boolean prefetchExternalChanges() default false;
-
- @AttributeDefinition(
- name = "NodeStoreProvider role",
- description = "Property indicating that this component will not register as a NodeStore but as a " +
- "NodeStoreProvider with given role")
- String role();
-
- @AttributeDefinition(
- name = "Version GC Max Age (in secs)",
- description = "Version Garbage Collector (GC) logic will only consider those deleted for GC which " +
- "are not accessed recently (currentTime - lastModifiedTime > versionGcMaxAgeInSecs). For " +
- "example as per default only those document which have been *marked* deleted 24 hrs ago will be " +
- "considered for GC. This also applies how older revision of live document are GC.")
- long versionGcMaxAgeInSecs() default DEFAULT_VER_GC_MAX_AGE;
-
- @AttributeDefinition(
- name = "Continuous Version GC Mode",
- description = "Run Version GC continuously as a background task.")
- boolean versionGCContinuous() default DEFAULT_CONTINUOUS_RGC;
-
- @AttributeDefinition(
- name = "Blob GC Max Age (in secs)",
- description = "Blob Garbage Collector (GC) logic will only consider those blobs for GC which " +
- "are not accessed recently (currentTime - lastModifiedTime > blobGcMaxAgeInSecs). For " +
- "example as per default only those blobs which have been created 24 hrs ago will be " +
- "considered for GC")
- long blobGcMaxAgeInSecs() default DEFAULT_BLOB_GC_MAX_AGE;
-
- @AttributeDefinition(
- name = "Blob tracking snapshot interval (in secs)",
- description = "This is the default interval in which the snapshots of locally tracked blob ids will"
- + "be taken and synchronized with the blob store. This should be configured to be less than the "
- + "frequency of blob GC so that deletions during blob GC can be accounted for "
- + "in the next GC execution.")
- long blobTrackSnapshotIntervalInSecs() default DEFAULT_BLOB_SNAPSHOT_INTERVAL;
-
- @AttributeDefinition(
- name = "Root directory",
- description = "Root directory for local tracking of blob ids. This service " +
- "will first lookup the 'repository.home' framework property and " +
- "then a component context property with the same name. If none " +
- "of them is defined, a sub directory 'repository' relative to " +
- "the current working directory is used.")
- String repository_home();
-
- @AttributeDefinition(
- name = "Max Replication Lag (in secs)",
- description = "Value in seconds. Determines the duration beyond which it can be safely assumed " +
- "that the state on the secondaries is consistent with the primary, and it is safe to read from them")
- long maxReplicationLagInSecs() default DEFAULT_MAX_REPLICATION_LAG;
-
- @AttributeDefinition(
- name = "DocumentStore Type",
- description = "Type of DocumentStore to use for persistence. Defaults to MONGO",
- options = {
- @Option(label = "MONGO", value = "MONGO"),
- @Option(label = "RDB", value = "RDB")})
- String documentStoreType() default "MONGO";
-
- @AttributeDefinition(
- name = "Bundling Disabled",
- description = "Boolean value indicating that Node bundling is disabled")
- boolean bundlingDisabled() default DEFAULT_BUNDLING_DISABLED;
-
- @AttributeDefinition(
- name = "DocumentNodeStore update.limit",
- description = "Number of content updates that need to happen before " +
- "the updates are automatically purged to the private branch.")
- int updateLimit();
-
- @AttributeDefinition(
- name = "Persistent Cache Includes",
- description = "Paths which should be cached in persistent cache")
- String[] persistentCacheIncludes() default {"/"};
- }
-
// property name constants - values can come from framework properties or OSGi config
private static final String PROP_URI = "mongouri";
private static final String PROP_DB = "db";