Package io.split.engine.experiments
Class RefreshableSplitFetcher
java.lang.Object
io.split.engine.experiments.RefreshableSplitFetcher
- All Implemented Interfaces:
SplitFetcher,Runnable
public class RefreshableSplitFetcher extends Object implements SplitFetcher, Runnable
An ExperimentFetcher that refreshes experiment definitions periodically.
- Author:
- adil
-
Constructor Summary
Constructors Constructor Description RefreshableSplitFetcher(SplitChangeFetcher splitChangeFetcher, SplitParser parser, SDKReadinessGates gates) -
Method Summary
Modifier and Type Method Description longchangeNumber()voidclear()Collection<ParsedSplit>fetch()ParsedSplitfetch(String test)List<ParsedSplit>fetchAll()Set<String>fetchKnownTrafficTypes()Fetches all the traffic types that are being used by the splits that are currently stored.voidforceRefresh()Forces a sync of splits, outside of any scheduled syncs.voidrun()voidrunWithoutExceptionHandling()
-
Constructor Details
-
RefreshableSplitFetcher
public RefreshableSplitFetcher(SplitChangeFetcher splitChangeFetcher, SplitParser parser, SDKReadinessGates gates)
-
-
Method Details
-
forceRefresh
public void forceRefresh()Description copied from interface:SplitFetcherForces a sync of splits, outside of any scheduled syncs. This method MUST NOT throw any exceptions.- Specified by:
forceRefreshin interfaceSplitFetcher
-
changeNumber
public long changeNumber() -
fetch
- Specified by:
fetchin interfaceSplitFetcher
-
fetchAll
- Specified by:
fetchAllin interfaceSplitFetcher
-
fetchKnownTrafficTypes
Description copied from interface:SplitFetcherFetches all the traffic types that are being used by the splits that are currently stored. For example, if the fetcher currently contains three splits, one of traffic type "account" and two of traffic type "user", this method will return ["account", "user"]- Specified by:
fetchKnownTrafficTypesin interfaceSplitFetcher- Returns:
- a set of all the traffic types used by the parsed splits
-
fetch
-
clear
public void clear() -
run
public void run() -
runWithoutExceptionHandling
- Throws:
InterruptedException
-