Class DocumentNodeStoreBuilder<T extends DocumentNodeStoreBuilder<T>>

    • Field Detail

      • DEFAULT_MEMORY_CACHE_SIZE

        public static final long DEFAULT_MEMORY_CACHE_SIZE
        See Also:
        Constant Field Values
      • DEFAULT_NODE_CACHE_PERCENTAGE

        public static final int DEFAULT_NODE_CACHE_PERCENTAGE
        See Also:
        Constant Field Values
      • DEFAULT_PREV_DOC_CACHE_PERCENTAGE

        public static final int DEFAULT_PREV_DOC_CACHE_PERCENTAGE
        See Also:
        Constant Field Values
      • DEFAULT_CHILDREN_CACHE_PERCENTAGE

        public static final int DEFAULT_CHILDREN_CACHE_PERCENTAGE
        See Also:
        Constant Field Values
      • DEFAULT_DIFF_CACHE_PERCENTAGE

        public static final int DEFAULT_DIFF_CACHE_PERCENTAGE
        See Also:
        Constant Field Values
      • DEFAULT_CACHE_SEGMENT_COUNT

        public static final int DEFAULT_CACHE_SEGMENT_COUNT
        See Also:
        Constant Field Values
      • DEFAULT_CACHE_STACK_MOVE_DISTANCE

        public static final int DEFAULT_CACHE_STACK_MOVE_DISTANCE
        See Also:
        Constant Field Values
    • Constructor Detail

      • DocumentNodeStoreBuilder

        public DocumentNodeStoreBuilder()
    • Method Detail

      • thisBuilder

        protected final T thisBuilder()
      • setPersistentCache

        public T setPersistentCache​(String persistentCache)
        Sets the persistent cache option.
        Returns:
        this
      • setJournalCache

        public T setJournalCache​(String journalCache)
        Sets the journal cache option.
        Returns:
        this
      • setTiming

        public T setTiming​(boolean timing)
        Use the timing document store wrapper.
        Parameters:
        timing - whether to use the timing wrapper.
        Returns:
        this
      • getTiming

        public boolean getTiming()
      • setLogging

        public T setLogging​(boolean logging)
      • getLogging

        public boolean getLogging()
      • setLoggingPrefix

        public T setLoggingPrefix​(String prefix)
        Sets a custom prefix for the logger.
        Parameters:
        prefix - to be used in the logs output.
        Returns:
        this
      • setThrottlingEnabled

        public T setThrottlingEnabled​(boolean b)
      • isThrottlingEnabled

        public boolean isThrottlingEnabled()
      • setFullGCEnabled

        public T setFullGCEnabled​(boolean b)
      • isFullGCEnabled

        public boolean isFullGCEnabled()
      • setFullGCIncludePaths

        public T setFullGCIncludePaths​(@Nullable
                                       @Nullable String[] includePaths)
      • getFullGCIncludePaths

        public Set<String> getFullGCIncludePaths()
      • setFullGCExcludePaths

        public T setFullGCExcludePaths​(@Nullable
                                       @Nullable String[] excludePaths)
      • getFullGCExcludePaths

        public Set<String> getFullGCExcludePaths()
      • setEmbeddedVerificationEnabled

        public T setEmbeddedVerificationEnabled​(boolean b)
      • isEmbeddedVerificationEnabled

        public boolean isEmbeddedVerificationEnabled()
      • setFullGCMode

        public T setFullGCMode​(int v)
      • getFullGCMode

        public int getFullGCMode()
      • setReadOnlyMode

        public T setReadOnlyMode()
      • getReadOnlyMode

        public boolean getReadOnlyMode()
      • setPrefetchFeature

        public T setPrefetchFeature​(@Nullable
                                    @Nullable Feature prefetch)
      • getPrefetchFeature

        @Nullable
        public @Nullable Feature getPrefetchFeature()
      • setDocStoreThrottlingFeature

        public T setDocStoreThrottlingFeature​(@Nullable
                                              @Nullable Feature docStoreThrottling)
      • getDocStoreThrottlingFeature

        @Nullable
        public @Nullable Feature getDocStoreThrottlingFeature()
      • setNoChildOrderCleanupFeature

        public T setNoChildOrderCleanupFeature​(@Nullable
                                               @Nullable Feature noChildOrderCleanupFeature)
      • getNoChildOrderCleanupFeature

        @Nullable
        public @Nullable Feature getNoChildOrderCleanupFeature()
      • setCancelInvalidationFeature

        public T setCancelInvalidationFeature​(@Nullable
                                              @Nullable Feature cancelInvalidation)
      • getCancelInvalidationFeature

        @Nullable
        public @Nullable Feature getCancelInvalidationFeature()
      • setDocStoreFullGCFeature

        public T setDocStoreFullGCFeature​(@Nullable
                                          @Nullable Feature docStoreFullGC)
      • getDocStoreFullGCFeature

        public Feature getDocStoreFullGCFeature()
      • setDocStoreEmbeddedVerificationFeature

        public T setDocStoreEmbeddedVerificationFeature​(@Nullable
                                                        @Nullable Feature getDocStoreEmbeddedVerification)
      • getDocStoreEmbeddedVerificationFeature

        @Nullable
        public @Nullable Feature getDocStoreEmbeddedVerificationFeature()
      • setLeaseFailureHandler

        public T setLeaseFailureHandler​(LeaseFailureHandler leaseFailureHandler)
      • setDocumentStore

        public T setDocumentStore​(DocumentStore documentStore)
        Set the document store to use. By default an in-memory store is used.
        Parameters:
        documentStore - the document store
        Returns:
        this
      • getDiffCache

        public org.apache.jackrabbit.oak.plugins.document.DiffCache getDiffCache​(int clusterId)
      • setBlobStore

        public T setBlobStore​(BlobStore blobStore)
        Set the blob store to use. By default an in-memory store is used.
        Parameters:
        blobStore - the blob store
        Returns:
        this
      • getBlobStore

        public BlobStore getBlobStore()
      • setClusterId

        public T setClusterId​(int clusterId)
        Set the cluster id to use. By default, 0 is used, meaning the cluster id is automatically generated.
        Parameters:
        clusterId - the cluster id
        Returns:
        this
      • setClusterInvisible

        public T setClusterInvisible​(boolean invisible)
        Set the cluster as invisible to the discovery lite service. By default it is visible.
        Returns:
        this
        See Also:
        DocumentDiscoveryLiteService
      • setCacheSegmentCount

        public T setCacheSegmentCount​(int cacheSegmentCount)
      • setCacheStackMoveDistance

        public T setCacheStackMoveDistance​(int cacheSegmentCount)
      • getClusterId

        public int getClusterId()
      • isClusterInvisible

        public boolean isClusterInvisible()
      • setAsyncDelay

        public T setAsyncDelay​(int asyncDelay)
        Set the maximum delay to write the last revision to the root node. By default 1000 (meaning 1 second) is used.
        Parameters:
        asyncDelay - in milliseconds
        Returns:
        this
      • getAsyncDelay

        public int getAsyncDelay()
      • setClusterIdReuseDelayAfterRecovery

        public T setClusterIdReuseDelayAfterRecovery​(long clusterIdReuseDelayAfterRecovery)
      • getClusterIdReuseDelayAfterRecovery

        public long getClusterIdReuseDelayAfterRecovery()
      • getWeigher

        public org.apache.jackrabbit.guava.common.cache.Weigher<CacheValue,​CacheValue> getWeigher()
      • withWeigher

        public T withWeigher​(org.apache.jackrabbit.guava.common.cache.Weigher<CacheValue,​CacheValue> weigher)
      • memoryCacheSize

        public T memoryCacheSize​(long memoryCacheSize)
      • memoryCacheDistribution

        public T memoryCacheDistribution​(int nodeCachePercentage,
                                         int prevDocCachePercentage,
                                         int childrenCachePercentage,
                                         int diffCachePercentage)
      • getNodeCacheSize

        public long getNodeCacheSize()
      • getPrevDocumentCacheSize

        public long getPrevDocumentCacheSize()
      • getChildrenCacheSize

        public long getChildrenCacheSize()
      • getDocumentCacheSize

        public long getDocumentCacheSize()
      • getDiffCacheSize

        public long getDiffCacheSize()
      • getMemoryDiffCacheSize

        public long getMemoryDiffCacheSize()
      • getLocalDiffCacheSize

        public long getLocalDiffCacheSize()
      • setUseSimpleRevision

        public T setUseSimpleRevision​(boolean useSimpleRevision)
      • isUseSimpleRevision

        public boolean isUseSimpleRevision()
      • getExecutor

        public Executor getExecutor()
      • setExecutor

        public T setExecutor​(Executor executor)
      • clock

        public T clock​(Clock clock)
      • setStatisticsProvider

        public T setStatisticsProvider​(StatisticsProvider statisticsProvider)
      • setThrottlingStatsCollector

        public T setThrottlingStatsCollector​(@NotNull
                                             @NotNull ThrottlingStatsCollector throttlingStatsCollector)
      • getBlobStoreStats

        @Nullable
        public @Nullable BlobStoreStats getBlobStoreStats()
      • getBlobStoreCacheStats

        @Nullable
        public @Nullable CacheStats getBlobStoreCacheStats()
      • getClock

        public Clock getClock()
      • disableBranches

        public T disableBranches()
      • isDisableBranches

        public boolean isDisableBranches()
      • setBundlingDisabled

        public T setBundlingDisabled​(boolean enabled)
      • isBundlingDisabled

        public boolean isBundlingDisabled()
      • setPrefetchExternalChanges

        public T setPrefetchExternalChanges​(boolean b)
      • isPrefetchExternalChanges

        public boolean isPrefetchExternalChanges()
      • setUpdateLimit

        public T setUpdateLimit​(int limit)
      • getUpdateLimit

        public int getUpdateLimit()
      • setCommitValueCacheSize

        public T setCommitValueCacheSize​(int cacheSize)
      • getCommitValueCacheSize

        public int getCommitValueCacheSize()
      • setCacheEmptyCommitValue

        public T setCacheEmptyCommitValue​(boolean enable)
        Controls whether caching of empty commit values (negative cache) is enabled. This cache is disabled by default. The cache can only be enabled on a read-only store. In read-write mode, the cache is always be disabled.
        Parameters:
        enable - true to enable the empty commit value cache.
        Returns:
        this builder.
      • getCacheEmptyCommitValue

        public boolean getCacheEmptyCommitValue()
        Returns:
        true when caching of empty commit values is enabled, false otherwise.
      • setJournalGCMaxAge

        public T setJournalGCMaxAge​(long maxRevisionAgeMillis)
      • getJournalGCMaxAge

        public long getJournalGCMaxAge()
        The maximum age for journal entries in milliseconds. Older entries are candidates for GC.
        Returns:
        maximum age for journal entries in milliseconds.
      • setRevisionGCMaxAge

        public T setRevisionGCMaxAge​(long maxRevisionGCAgeMillis)
      • getRevisionGCMaxAge

        public long getRevisionGCMaxAge()
        The maximum age for changes in milliseconds. Older changes are candidates for revision garbage collection.
        Returns:
        maximum age in milliseconds.
      • setSuspendTimeoutMillis

        public T setSuspendTimeoutMillis​(long suspendTimeoutMillis)
      • getSuspendTimeoutMillis

        public long getSuspendTimeoutMillis()
      • setRecoveryDelayMillis

        public T setRecoveryDelayMillis​(long recoveryDelayMillis)
      • getRecoveryDelayMillis

        public long getRecoveryDelayMillis()
      • setGCMonitor

        public T setGCMonitor​(@NotNull
                              @NotNull GCMonitor gcMonitor)
      • getGCMonitor

        public GCMonitor getGCMonitor()
      • buildMemoryDiffCache

        public org.apache.jackrabbit.guava.common.cache.Cache<CacheValue,​StringValue> buildMemoryDiffCache()
      • setNodeCachePathPredicate

        public T setNodeCachePathPredicate​(Predicate<Path> p)
      • getNodeCachePathPredicate

        public Predicate<Path> getNodeCachePathPredicate()