Class MongoThrottlerFactory
- java.lang.Object
-
- org.apache.jackrabbit.oak.plugins.document.mongo.MongoThrottlerFactory
-
public final class MongoThrottlerFactory extends java.lang.Object
Factory to create Mongo Throttlers
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Throttler
exponentialThrottler(int threshold, org.apache.jackrabbit.guava.common.util.concurrent.AtomicDouble oplogWindow, long throttlingTime)
Returns an instance of @Throttler
which throttles the system exponentially based on remaining threshold defined.static Throttler
noThrottler()
AThrottler
which doesn't do any throttling, no matter how much system is under load
-
-
-
Method Detail
-
exponentialThrottler
public static Throttler exponentialThrottler(int threshold, org.apache.jackrabbit.guava.common.util.concurrent.AtomicDouble oplogWindow, long throttlingTime)
Returns an instance of @Throttler
which throttles the system exponentially based on remaining threshold defined.- Parameters:
threshold
- threshold for throttlingoplogWindow
- current oplog window for mongothrottlingTime
- time duration for throttling- Returns:
- an exponential throttler to throttle system if required
-
-