Class MongoDocumentNodeStoreBuilderBase<T extends MongoDocumentNodeStoreBuilderBase<T>>
- java.lang.Object
-
- org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreBuilder<T>
-
- org.apache.jackrabbit.oak.plugins.document.mongo.MongoDocumentNodeStoreBuilderBase<T>
-
- Direct Known Subclasses:
MongoDocumentNodeStoreBuilder
public abstract class MongoDocumentNodeStoreBuilderBase<T extends MongoDocumentNodeStoreBuilderBase<T>> extends DocumentNodeStoreBuilder<T>
A base builder implementation for aDocumentNodeStorebacked by MongoDB.
-
-
Field Summary
-
Fields inherited from class org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreBuilder
blobStoreSupplier, DEFAULT_CACHE_SEGMENT_COUNT, DEFAULT_CACHE_STACK_MOVE_DISTANCE, DEFAULT_CHILDREN_CACHE_PERCENTAGE, DEFAULT_DIFF_CACHE_PERCENTAGE, DEFAULT_MEMORY_CACHE_SIZE, DEFAULT_NODE_CACHE_PERCENTAGE, DEFAULT_PREV_DOC_CACHE_PERCENTAGE, DEFAULT_PREV_NO_PROP_CACHE_PERCENTAGE, DEFAULT_UPDATE_LIMIT, documentStoreSupplier
-
-
Constructor Summary
Constructors Constructor Description MongoDocumentNodeStoreBuilderBase()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description MissingLastRevSeekercreateMissingLastRevSeeker()Iterable<ReferencedBlob>createReferencedBlobs(DocumentNodeStore ns)VersionGCSupportcreateVersionGCSupport()StringgetCollectionCompressionType()com.mongodb.client.MongoClientgetMongoClient()Returns the MongoDB client configured in thesetMongoDB(String, String, int)method.booleanisSocketKeepAlive()Deprecated.TsetClientSessionDisabled(boolean b)Disables the use of a client session available with MongoDB 3.6 and newer.TsetCollectionCompressionType(String compressionType)TsetLeaseSocketTimeout(int timeoutMillis)Sets a socket timeout for lease update operations.TsetMaxReplicationLag(long duration, TimeUnit unit)TsetMongoConnectTimeoutMillis(int connectTimeoutMillis)TsetMongoDB(@NotNull com.mongodb.client.MongoClient client, @NotNull String dbName)Use the given MongoDB as backend storage for the DocumentNodeStore.TsetMongoDB(@NotNull com.mongodb.client.MongoClient client, @NotNull String dbName, int blobCacheSizeMB)Use the given MongoDB as backend storage for the DocumentNodeStore.TsetMongoDB(@NotNull String uri, @NotNull String name, int blobCacheSizeMB)Uses the given information to connect to to MongoDB as backend storage for the DocumentNodeStore.TsetMongoHeartbeatFrequencyMillis(int heartbeatFrequencyMillis)TsetMongoMaxConnecting(int maxConnecting)TsetMongoMaxIdleTimeMillis(int maxIdleTimeMillis)TsetMongoMaxLifeTimeMillis(int maxLifeTimeMillis)TsetMongoMaxPoolSize(int maxPoolSize)TsetMongoMinHeartbeatFrequencyMillis(int minHeartbeatFrequencyMillis)TsetMongoMinPoolSize(int minPoolSize)TsetMongoQueryWarningThresholdMillis(long thresholdMillis)Sets the threshold for logging warnings when MongoDB queries exceed this duration.TsetMongoReadTimeoutMillis(int readTimeoutMillis)TsetMongoServerSelectionTimeoutMillis(int serverSelectionTimeoutMillis)TsetMongoWaitQueueTimeoutMillis(int waitQueueTimeoutMillis)TsetSocketKeepAlive(boolean enable)Deprecated.-
Methods inherited from class org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreBuilder
avoidMergeLock, build, buildChildrenCache, buildDocumentCache, buildLocalDiffCache, buildMemoryDiffCache, buildNodeCache, buildNodeDocumentCache, buildPrevDocumentsCache, buildPrevNoPropCache, clock, disableBranches, getAsyncDelay, getBlobStore, getBlobStoreCacheStats, getBlobStoreStats, getCacheEmptyCommitValue, getCancelInvalidationFeature, getChildrenCacheSize, getClock, getClusterId, getClusterIdReuseDelayAfterRecovery, getCommitValueCacheSize, getDiffCache, getDiffCacheSize, getDocStoreAvoidMergeLockFeature, getDocStoreEmbeddedVerificationFeature, getDocStoreFullGCFeature, getDocStoreThrottlingFeature, getDocumentCacheSize, getDocumentStore, getDocumentStoreStatsCollector, getExecutor, getFullGCBatchSize, getFullGCDelayFactor, getFullGCExcludePaths, getFullGCGeneration, getFullGCIncludePaths, getFullGcMaxAgeMillis, getFullGCMode, getFullGCProgressSize, getGCMonitor, getJournalGCMaxAge, getJournalPropertyHandlerFactory, getLeaseCheck, getLeaseFailureHandler, getLocalDiffCacheSize, getLogging, getMemoryDiffCacheSize, getNoChildOrderCleanupFeature, getNodeCachePathPredicate, getNodeCachePredicate, getNodeCacheSize, getNodeStoreStatsCollector, getPerfloggerInfoMillis, getPersistenceCacheStats, getPersistentCache, getPrefetchFeature, getPrevDocumentCacheSize, getPrevNoPropCacheFeature, getPrevNoPropCacheSize, getReadOnlyMode, getRecoveryDelayMillis, getRevisionGCMaxAge, getStatisticsProvider, getSuspendTimeoutMillis, getThrottlingJobSchedulePeriodSecs, getThrottlingStatsCollector, getThrottlingTimeMillis, getTiming, getUpdateLimit, getWeigher, isBundlingDisabled, isClusterInvisible, isDisableBranches, isEmbeddedVerificationEnabled, isFullGCAuditLoggingEnabled, isFullGCEnabled, isPrefetchExternalChanges, isThrottlingEnabled, isUseSimpleRevision, memoryCacheDistribution, memoryCacheSize, newDocumentNodeStoreBuilder, setAsyncDelay, setAvoidMergeLock, setBlobStore, setBundlingDisabled, setCacheEmptyCommitValue, setCacheSegmentCount, setCacheStackMoveDistance, setCancelInvalidationFeature, setClusterId, setClusterIdReuseDelayAfterRecovery, setClusterInvisible, setCommitValueCacheSize, setDocStoreAvoidMergeLockFeature, setDocStoreEmbeddedVerificationFeature, setDocStoreFullGCFeature, setDocStoreThrottlingFeature, setDocumentStore, setDocumentStoreStatsCollector, setEmbeddedVerificationEnabled, setExecutor, setFullGCAuditLoggingEnabled, setFullGCBatchSize, setFullGCDelayFactor, setFullGCEnabled, setFullGCExcludePaths, setFullGCGeneration, setFullGCIncludePaths, setFullGcMaxAgeMillis, setFullGCMode, setFullGCProgressSize, setGCMonitor, setJournalCache, setJournalGCMaxAge, setJournalPropertyHandlerFactory, setLeaseCheck, setLeaseCheckMode, setLeaseFailureHandler, setLogging, setLoggingPrefix, setNoChildOrderCleanupFeature, setNodeCachePathPredicate, setNodeCachePredicate, setNodeStoreStatsCollector, setPerfloggerInfoMillis, setPersistentCache, setPrefetchExternalChanges, setPrefetchFeature, setPrevNoPropCacheFeature, setReadOnlyMode, setRecoveryDelayMillis, setRevisionGCMaxAge, setStatisticsProvider, setSuspendTimeoutMillis, setThrottlingEnabled, setThrottlingJobSchedulePeriodSecs, setThrottlingStatsCollector, setThrottlingTimeMillis, setTiming, setUpdateLimit, setUseSimpleRevision, thisBuilder, withWeigher
-
-
-
-
Method Detail
-
setMongoDB
public T setMongoDB(@NotNull @NotNull String uri, @NotNull @NotNull String name, int blobCacheSizeMB)
Uses the given information to connect to to MongoDB as backend storage for the DocumentNodeStore. The write concern is either taken from the URI or determined automatically based on the MongoDB setup. When running on a replica set without explicit write concern in the URI, the write concern will beMAJORITY, otherwiseACKNOWLEDGED.- Parameters:
uri- a MongoDB URI.name- the name of the database to connect to. This overrides any database name given in theuri.blobCacheSizeMB- the blob cache size in MB.- Returns:
- this
-
setMongoDB
public T setMongoDB(@NotNull @NotNull com.mongodb.client.MongoClient client, @NotNull @NotNull String dbName, int blobCacheSizeMB)
Use the given MongoDB as backend storage for the DocumentNodeStore.- Parameters:
client- the MongoDB connectiondbName- the database nameblobCacheSizeMB- the size of the blob cache in MB.- Returns:
- this
-
setMongoDB
public T setMongoDB(@NotNull @NotNull com.mongodb.client.MongoClient client, @NotNull @NotNull String dbName)
Use the given MongoDB as backend storage for the DocumentNodeStore.- Parameters:
client- the MongoDB connectiondbName- the database name- Returns:
- this
-
setSocketKeepAlive
@Deprecated public T setSocketKeepAlive(boolean enable)
Deprecated.Enables or disables the socket keep-alive option for MongoDB. The default is enabled.- Parameters:
enable- whether to enable or disable it.- Returns:
- this
-
isSocketKeepAlive
@Deprecated public boolean isSocketKeepAlive()
Deprecated.- Returns:
- whether socket keep-alive is enabled.
-
setClientSessionDisabled
public T setClientSessionDisabled(boolean b)
Disables the use of a client session available with MongoDB 3.6 and newer. By default the MongoDocumentStore will use a client session if available. That is, when connected to MongoDB 3.6 and newer.- Parameters:
b- whether to disable the use of a client session.- Returns:
- this
-
setLeaseSocketTimeout
public T setLeaseSocketTimeout(int timeoutMillis)
Sets a socket timeout for lease update operations.- Parameters:
timeoutMillis- the socket timeout in milliseconds.- Returns:
- this builder.
-
setMongoMaxPoolSize
public T setMongoMaxPoolSize(int maxPoolSize)
-
setMongoMinPoolSize
public T setMongoMinPoolSize(int minPoolSize)
-
setMongoMaxConnecting
public T setMongoMaxConnecting(int maxConnecting)
-
setMongoMaxIdleTimeMillis
public T setMongoMaxIdleTimeMillis(int maxIdleTimeMillis)
-
setMongoMaxLifeTimeMillis
public T setMongoMaxLifeTimeMillis(int maxLifeTimeMillis)
-
setMongoConnectTimeoutMillis
public T setMongoConnectTimeoutMillis(int connectTimeoutMillis)
-
setMongoHeartbeatFrequencyMillis
public T setMongoHeartbeatFrequencyMillis(int heartbeatFrequencyMillis)
-
setMongoServerSelectionTimeoutMillis
public T setMongoServerSelectionTimeoutMillis(int serverSelectionTimeoutMillis)
-
setMongoWaitQueueTimeoutMillis
public T setMongoWaitQueueTimeoutMillis(int waitQueueTimeoutMillis)
-
setMongoReadTimeoutMillis
public T setMongoReadTimeoutMillis(int readTimeoutMillis)
-
setMongoMinHeartbeatFrequencyMillis
public T setMongoMinHeartbeatFrequencyMillis(int minHeartbeatFrequencyMillis)
-
setMongoQueryWarningThresholdMillis
public T setMongoQueryWarningThresholdMillis(long thresholdMillis)
Sets the threshold for logging warnings when MongoDB queries exceed this duration.- Parameters:
thresholdMillis- the threshold in milliseconds. A value of 0 disables warnings.- Returns:
- this builder.
-
createVersionGCSupport
public VersionGCSupport createVersionGCSupport()
- Overrides:
createVersionGCSupportin classDocumentNodeStoreBuilder<T extends MongoDocumentNodeStoreBuilderBase<T>>
-
createReferencedBlobs
public Iterable<ReferencedBlob> createReferencedBlobs(DocumentNodeStore ns)
- Overrides:
createReferencedBlobsin classDocumentNodeStoreBuilder<T extends MongoDocumentNodeStoreBuilderBase<T>>
-
createMissingLastRevSeeker
public MissingLastRevSeeker createMissingLastRevSeeker()
- Overrides:
createMissingLastRevSeekerin classDocumentNodeStoreBuilder<T extends MongoDocumentNodeStoreBuilderBase<T>>
-
getCollectionCompressionType
public String getCollectionCompressionType()
-
getMongoClient
public com.mongodb.client.MongoClient getMongoClient()
Returns the MongoDB client configured in thesetMongoDB(String, String, int)method.- Returns:
- the client or null if the
setMongoDB(String, String, int)method hasn't been called.
-
-