Package com.configcat

Class PollingModes


  • public final class PollingModes
    extends java.lang.Object
    Describes the polling modes.
    • Constructor Summary

      Constructors 
      Constructor Description
      PollingModes()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static PollingMode autoPoll()
      Set up the auto polling mode with default parameters.
      static PollingMode autoPoll​(int autoPollIntervalInSeconds)
      Set up the auto polling mode with custom parameters.
      static PollingMode autoPoll​(int autoPollIntervalInSeconds, int maxInitWaitTimeSeconds)
      Set up the auto polling mode with custom parameters.
      static PollingMode lazyLoad()
      Set up a lazy polling mode with default parameters.
      static PollingMode lazyLoad​(int cacheRefreshIntervalInSeconds)
      Set up a lazy polling mode with custom parameters.
      static PollingMode manualPoll()
      Set up the manual polling mode.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PollingModes

        public PollingModes()
    • Method Detail

      • autoPoll

        public static PollingMode autoPoll()
        Set up the auto polling mode with default parameters.
        Returns:
        the auto polling mode.
      • autoPoll

        public static PollingMode autoPoll​(int autoPollIntervalInSeconds)
        Set up the auto polling mode with custom parameters.
        Parameters:
        autoPollIntervalInSeconds - Sets how often the config.json should be fetched and cached.
        Returns:
        the auto polling mode.
      • autoPoll

        public static PollingMode autoPoll​(int autoPollIntervalInSeconds,
                                           int maxInitWaitTimeSeconds)
        Set up the auto polling mode with custom parameters.
        Parameters:
        autoPollIntervalInSeconds - Sets how often the config.json should be fetched and cached.
        maxInitWaitTimeSeconds - Sets the time limit between the initialization of the client and the first config.json acquisition.
        Returns:
        the auto polling mode.
      • lazyLoad

        public static PollingMode lazyLoad()
        Set up a lazy polling mode with default parameters.
        Returns:
        the lazy polling mode.
      • lazyLoad

        public static PollingMode lazyLoad​(int cacheRefreshIntervalInSeconds)
        Set up a lazy polling mode with custom parameters.
        Parameters:
        cacheRefreshIntervalInSeconds - Sets how long the cache will store its value before fetching the latest from the network again.
        Returns:
        the lazy polling mode.
      • manualPoll

        public static PollingMode manualPoll()
        Set up the manual polling mode.
        Returns:
        the manual polling mode.