Class 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()
      A Throttler which doesn't do any throttling, no matter how much system is under load
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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