Package io.split.client
Class LocalhostSplitFactory
java.lang.Object
io.split.client.LocalhostSplitFactory
- All Implemented Interfaces:
SplitFactory
public final class LocalhostSplitFactory extends Object implements SplitFactory
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 Split in localhost environment.
The startup order is as follows:
- Split will use config.splitFile (full path) if set and will look for a yaml (new) format.
- otherwise Split will look for $user.home/.split file if it exists (for backward compatibility with older versions)
-
Constructor Summary
Constructors Constructor Description LocalhostSplitFactory(String directory, String file) -
Method Summary
Modifier and Type Method Description SplitClientclient()static LocalhostSplitFactorycreateLocalhostSplitFactory(SplitClientConfig config)voiddestroy()booleanisDestroyed()SplitManagermanager()voidupdateFeatureToTreatmentMap(Map<SplitAndKey,LocalhostSplit> featureToTreatmentMap)
-
Constructor Details
-
LocalhostSplitFactory
- Throws:
IOException
-
-
Method Details
-
createLocalhostSplitFactory
public static LocalhostSplitFactory createLocalhostSplitFactory(SplitClientConfig config) throws IOException- Throws:
IOException
-
client
- Specified by:
clientin interfaceSplitFactory
-
manager
- Specified by:
managerin interfaceSplitFactory
-
destroy
public void destroy()- Specified by:
destroyin interfaceSplitFactory
-
isDestroyed
public boolean isDestroyed()- Specified by:
isDestroyedin interfaceSplitFactory
-
updateFeatureToTreatmentMap
-