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
      • documentStoreSupplier

        protected org.apache.jackrabbit.guava.common.base.Supplier<DocumentStore> documentStoreSupplier
      • blobStoreSupplier

        protected org.apache.jackrabbit.guava.common.base.Supplier<BlobStore> blobStoreSupplier
    • Constructor Detail

      • DocumentNodeStoreBuilder

        public DocumentNodeStoreBuilder()
    • Method Detail

      • thisBuilder

        protected final T thisBuilder()
      • setPersistentCache

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

        public T setJournalCache​(java.lang.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​(java.lang.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()
      • 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()
      • 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()
      • 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 java.util.concurrent.Executor getExecutor()
      • setExecutor

        public T setExecutor​(java.util.concurrent.Executor executor)
      • clock

        public T clock​(Clock clock)
      • setStatisticsProvider

        public T setStatisticsProvider​(StatisticsProvider statisticsProvider)
      • setThrottlingStatsCollector

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

        @NotNull
        public @NotNull java.util.Map<java.lang.String,​PersistentCacheStats> getPersistenceCacheStats()
      • 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()
      • setGCMonitor

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

        public GCMonitor getGCMonitor()
      • buildMemoryDiffCache

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

        @Deprecated
        public T setNodeCachePredicate​(org.apache.jackrabbit.guava.common.base.Predicate<java.lang.String> p)
        Deprecated.
      • getNodeCachePredicate

        @Deprecated
        public org.apache.jackrabbit.guava.common.base.Predicate<java.lang.String> getNodeCachePredicate()
        Deprecated.
      • setNodeCachePathPredicate

        public T setNodeCachePathPredicate​(org.apache.jackrabbit.guava.common.base.Predicate<Path> p)
      • getNodeCachePathPredicate

        public org.apache.jackrabbit.guava.common.base.Predicate<Path> getNodeCachePathPredicate()