Package com.configcat
Class PollingModes
- java.lang.Object
-
- com.configcat.PollingModes
-
public final class PollingModes extends java.lang.ObjectDescribes the polling modes.
-
-
Constructor Summary
Constructors Constructor Description PollingModes()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static PollingModeautoPoll()Set up the auto polling mode with default parameters.static PollingModeautoPoll(int autoPollIntervalInSeconds)Set up the auto polling mode with custom parameters.static PollingModeautoPoll(int autoPollIntervalInSeconds, int maxInitWaitTimeSeconds)Set up the auto polling mode with custom parameters.static PollingModelazyLoad()Set up a lazy polling mode with default parameters.static PollingModelazyLoad(int cacheRefreshIntervalInSeconds)Set up a lazy polling mode with custom parameters.static PollingModemanualPoll()Set up the manual polling mode.
-
-
-
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.
-
-