Class MongoDocumentStoreThrottlingFactorUpdater
- java.lang.Object
-
- org.apache.jackrabbit.oak.plugins.document.mongo.MongoDocumentStoreThrottlingFactorUpdater
-
- All Implemented Interfaces:
Closeable,AutoCloseable
public class MongoDocumentStoreThrottlingFactorUpdater extends Object implements Closeable
Reads throttling values from the MongoDB settings collection.This class provides methods to fetch the throttling factor and related settings from the MongoDB database for use in throttling logic.
-
-
Constructor Summary
Constructors Constructor Description MongoDocumentStoreThrottlingFactorUpdater(@NotNull com.mongodb.client.MongoDatabase localDb, @NotNull AtomicReference<Integer> factor, int period)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voidscheduleFactorUpdates()intupdateFactor()
-
-
-
Field Detail
-
SIZE
public static final String SIZE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
MongoDocumentStoreThrottlingFactorUpdater
public MongoDocumentStoreThrottlingFactorUpdater(@NotNull @NotNull com.mongodb.client.MongoDatabase localDb, @NotNull @NotNull AtomicReference<Integer> factor, int period)
-
-
Method Detail
-
scheduleFactorUpdates
public void scheduleFactorUpdates()
-
updateFactor
public int updateFactor()
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
-