Package io.split.client
Class LocalhostSplitManager
java.lang.Object
io.split.client.LocalhostSplitManager
- All Implemented Interfaces:
SplitManager
public final class LocalhostSplitManager extends Object implements SplitManager
An implementation of SplitClient that considers all partitions
passed in the constructor to be 100% on for all users, and
any other split to be 100% off for all users. This implementation
is useful for using Codigo in localhost environment.
- Author:
- adil
-
Method Summary
Modifier and Type Method Description voidblockUntilReady()The SDK kicks off background threads to download data necessary for using the SDK.static LocalhostSplitManagerof(Map<SplitAndKey,LocalhostSplit> featureToTreatmentMap)SplitViewsplit(String featureName)Returns the feature (or Split) registered with the SDK of this name.List<String>splitNames()Returns the names of features (or Splits) registered with the SDK.List<SplitView>splits()Retrieves the features (or Splits) that are currently registered with the SDK.
-
Method Details
-
of
-
splits
Description copied from interface:SplitManagerRetrieves the features (or Splits) that are currently registered with the SDK.- Specified by:
splitsin interfaceSplitManager- Returns:
- a List of SplitView or empty
-
splitNames
Description copied from interface:SplitManagerReturns the names of features (or Splits) registered with the SDK.- Specified by:
splitNamesin interfaceSplitManager- Returns:
- a List of String (Split Feature Names) or empty
-
blockUntilReady
Description copied from interface:SplitManagerThe SDK kicks off background threads to download data necessary for using the SDK. You can choose to block until the SDK has downloaded split definitions so that you will not get the 'control' treatment.If the download is not successful in the time period set on
SplitClientConfig.Builder.setBlockUntilReadyTimeout(int), a TimeoutException will be thrown.- Specified by:
blockUntilReadyin interfaceSplitManager- Throws:
TimeoutExceptionInterruptedException
-
split
Description copied from interface:SplitManagerReturns the feature (or Split) registered with the SDK of this name.- Specified by:
splitin interfaceSplitManager- Returns:
- SplitView or null
-