Package com.variant.share.schema
Interface Experiment
public interface Experiment
Representation of the
/experiments list element.- Since:
- 0.5
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceRepresentation of the/experiments[]/experiencekey.static interfaceRepresentation of the/experiments[]/onStates[]array element. -
Method Summary
Modifier and TypeMethodDescriptionThe experiments declared as concurrent with this experiment, as provided by the/experiments[]/concurrentWithkey.Get this experiment's control experience.getExperience(String name) Get an experience by its name.This experiment's experiences, as provided by the/experiments[]/experienceselement.getHooks()List of experiment-scoped lifecycle hooks, as provided by the/experiments[]/hookskey.getName()This experiment's name, as provided by the/experiments[]/nameelement.getOnState(State state) This experiment's instrumentation details on a given state, as provided by an element of the/experiments[]/onStatessequence key.List of this experiment's state instrumentations, as provided by the/experiments[]/onStateskey.Experiment parameters defined by this experiment.The containing experiment schema.The time-to-live settings of this experiment, as provided by the/experiments[]/timeToLivekey.booleanisConcurrentWith(Experiment other) Is a given experiment declared as concurrent with this experiment,or vice versa.default booleanIs a given experiment neither serial with (i.e.booleanisInstruments(State state) Does this experiment instrument a given state?booleanisOn()Is this experiment currently online, as provided by the/experiments[]/isOnkey.booleanisSerialWith(Experiment other) Is this experiment serial with a given experiment.
-
Method Details
-
getSchema
Schema getSchema()The containing experiment schema.- Since:
- 0.6
-
getName
String getName()This experiment's name, as provided by the/experiments[]/nameelement.- Since:
- 0.5
-
getExperiences
List<Experiment.Experience> getExperiences()This experiment's experiences, as provided by the/experiments[]/experienceselement.- Returns:
- An immutable list of
Experiment.Experienceobjects in ordinal order. - Since:
- 0.5
-
getExperience
Get an experience by its name.- Returns:
- An
Optional, containing the experience with the given name, or empty if no such experience in this experiment. - Since:
- 0.5
-
getControlExperience
Experiment.Experience getControlExperience()Get this experiment's control experience.- Returns:
- An
Experiment.Experienceobject. Cannot be null. - Since:
- 0.5
-
isOn
boolean isOn()Is this experiment currently online, as provided by the/experiments[]/isOnkey. All sessions are implicitly disqualified for an offline experiment, as if it did not exist at all. None of this experiment's experiences will appear in the list of a session's live experiences.- Returns:
- true if the test is online, false if not.
- Since:
- 0.5
-
getHooks
List<ExperimentHook> getHooks()List of experiment-scoped lifecycle hooks, as provided by the/experiments[]/hookskey.- Returns:
- An immutable list of
ExperimentHookobjects in ordinal order. - Since:
- 0.7
-
getOnStates
List<Experiment.OnState> getOnStates()List of this experiment's state instrumentations, as provided by the/experiments[]/onStateskey.- Returns:
- An immutable list of objects of type
Experiment.OnState. Cannot be null. - Since:
- 0.5
-
getConcurrentExperiments
List<Experiment> getConcurrentExperiments()The experiments declared as concurrent with this experiment, as provided by the/experiments[]/concurrentWithkey.- Returns:
- An immutable list of concurrent experiments in ordinal order.
- Since:
- 0.5
-
getTimeToLive
TimeToLive getTimeToLive()The time-to-live settings of this experiment, as provided by the/experiments[]/timeToLivekey.- Since:
- 0.10
-
getParameters
Experiment parameters defined by this experiment.- Returns:
- An immutable map of experiment parameters.
- Since:
- 1.0
-