Class MongoThrottlerFactory


  • public final class MongoThrottlerFactory
    extends Object
    Factory to create Mongo Throttlers
    • 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 throttling
        oplogWindow - current oplog window for mongo
        throttlingTime - time duration for throttling
        Returns:
        an exponential throttler to throttle system if required
      • noThrottler

        public static Throttler noThrottler()
        A Throttler which doesn't do any throttling, no matter how much system is under load
        Returns:
        No throttler