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
All Methods Instance Methods Concrete Methods 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 Detail
-
RefreshableSplitFetcher
public RefreshableSplitFetcher(SplitChangeFetcher splitChangeFetcher, SplitParser parser, SDKReadinessGates gates)
-
-
Method Detail
-
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
public ParsedSplit fetch(String test)
- Specified by:
fetchin interfaceSplitFetcher
-
fetchAll
public List<ParsedSplit> fetchAll()
- Specified by:
fetchAllin interfaceSplitFetcher
-
fetchKnownTrafficTypes
public Set<String> 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
public Collection<ParsedSplit> fetch()
-
clear
public void clear()
-
runWithoutExceptionHandling
public void runWithoutExceptionHandling() throws InterruptedException- Throws:
InterruptedException
-
-