public class AlwaysReturnControlSplitClient extends Object implements SplitClient
| Constructor and Description |
|---|
AlwaysReturnControlSplitClient() |
| Modifier and Type | Method and Description |
|---|---|
void |
destroy()
Destroys the background processes and clears the cache, releasing the resources used by
the any instances of SplitClient or SplitManager generated by the client's parent SplitFactory
|
String |
getTreatment(Key key,
String split,
Map<String,Object> attributes)
To understand why this method is useful, consider the following simple Split as an example:
if user is in segment employees then split 100%:on
else if user is in segment all then split 20%:on,80%:off
There are two concepts here: matching and bucketing.
|
String |
getTreatment(String key,
String split)
Returns the treatment to show this key for this feature.
|
String |
getTreatment(String key,
String split,
Map<String,Object> attributes)
This method is useful when you want to determine the treatment to show
to an customer (user, account etc.) based on an attribute of that customer
instead of it's key.
|
boolean |
track(String key,
String trafficType,
String eventType)
Enqueue a new event to be sent to split data collection services
Example:
client.track(“account”, “Split Software”, “checkout”)
|
boolean |
track(String key,
String trafficType,
String eventType,
double value)
Enqueue a new event to be sent to split data collection services
Example:
client.track(“account”, “Split Software”, “checkout”, 200.00)
|
public String getTreatment(String key, String split)
SplitClientgetTreatment in interface SplitClientkey - a unique key of your customer (e.g. user_id, user_email, account_id, etc.) MUST not be null.split - the feature we want to evaluate. MUST NOT be null.public String getTreatment(String key, String split, Map<String,Object> attributes)
SplitClientgetTreatment in interface SplitClientkey - a unique key of your customer (e.g. user_id, user_email, account_id, etc.) MUST not be null.split - the feature we want to evaluate. MUST NOT be null.attributes - of the customer (user, account etc.) to use in evaluation. Can be null or empty.public String getTreatment(Key key, String split, Map<String,Object> attributes)
SplitClientgetTreatment in interface SplitClientkey - the matching and bucketing keys. MUST NOT be null.split - the feature we want to evaluate. MUST NOT be null.attributes - of the entity (user, account etc.) to use in evaluation. Can be null or empty.public void destroy()
SplitClientdestroy in interface SplitClientpublic boolean track(String key, String trafficType, String eventType)
SplitClienttrack in interface SplitClientkey - the identifier of the entitytrafficType - the type of the eventeventType - the type of the eventpublic boolean track(String key, String trafficType, String eventType, double value)
SplitClienttrack in interface SplitClientkey - the identifier of the entitytrafficType - the type of the eventeventType - the type of the eventvalue - the value of the eventCopyright © 2018. All rights reserved.