Class MongoDocumentNodeStoreBuilderBase<T extends MongoDocumentNodeStoreBuilderBase<T>>

    • Constructor Detail

      • MongoDocumentNodeStoreBuilderBase

        public MongoDocumentNodeStoreBuilderBase()
    • 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 be MAJORITY, otherwise ACKNOWLEDGED.
        Parameters:
        uri - a MongoDB URI.
        name - the name of the database to connect to. This overrides any database name given in the uri.
        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 connection
        dbName - the database name
        blobCacheSizeMB - 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 connection
        dbName - 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.
      • setMaxReplicationLag

        public T setMaxReplicationLag​(long duration,
                                      TimeUnit unit)
      • setCollectionCompressionType

        public T setCollectionCompressionType​(String compressionType)
      • getCollectionCompressionType

        public String getCollectionCompressionType()