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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description SplitClientclient()static LocalhostSplitFactorycreateLocalhostSplitFactory(SplitClientConfig config)voiddestroy()booleanisDestroyed()SplitManagermanager()voidupdateFeatureToTreatmentMap(Map<SplitAndKey,LocalhostSplit> featureToTreatmentMap)
-
-
-
Constructor Detail
-
LocalhostSplitFactory
public LocalhostSplitFactory(String directory, String file) throws IOException
- Throws:
IOException
-
-
Method Detail
-
createLocalhostSplitFactory
public static LocalhostSplitFactory createLocalhostSplitFactory(SplitClientConfig config) throws IOException
- Throws:
IOException
-
client
public SplitClient client()
- Specified by:
clientin interfaceSplitFactory
-
manager
public SplitManager manager()
- Specified by:
managerin interfaceSplitFactory
-
destroy
public void destroy()
- Specified by:
destroyin interfaceSplitFactory
-
isDestroyed
public boolean isDestroyed()
- Specified by:
isDestroyedin interfaceSplitFactory
-
updateFeatureToTreatmentMap
public void updateFeatureToTreatmentMap(Map<SplitAndKey,LocalhostSplit> featureToTreatmentMap)
-
-