Package com.variant.share.schema
Interface Experiment
public interface Experiment
Representation of the
/experiments
list element.- Since:
- 0.5
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
Representation of the/experiments[]/experience
key.static interface
Representation of the/experiments[]/onStates[]
array element. -
Method Summary
Modifier and TypeMethodDescriptionThe experiments declared as concurrent with this experiment, as provided by the/experiments[]/concurrentWith
key.Get this experiment's control experience.getExperience
(String name) Get an experience by its name.This experiment's experiences, as provided by the/experiments[]/experiences
element.getHooks()
List of experiment-scoped lifecycle hooks, as provided by the/experiments[]/hooks
key.getName()
This experiment's name, as provided by the/experiments[]/name
element.getOnState
(State state) This experiment's instrumentation details on a given state, as provided by an element of the/experiments[]/onStates
sequence key.List of this experiment's state instrumentations, as provided by the/experiments[]/onStates
key.Experiment parameters defined by this experiment.The containing experiment schema.The time-to-live settings of this experiment, as provided by the/experiments[]/timeToLive
key.boolean
isConcurrentWith
(Experiment other) Is a given experiment declared as concurrent with this experiment,or vice versa.default boolean
Is a given experiment neither serial with (i.e.boolean
isInstruments
(State state) Does this experiment instrument a given state?boolean
isOn()
Is this experiment currently online, as provided by the/experiments[]/isOn
key.boolean
isSerialWith
(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[]/name
element.- Since:
- 0.5
-
getExperiences
List<Experiment.Experience> getExperiences()This experiment's experiences, as provided by the/experiments[]/experiences
element.- Returns:
- An immutable list of
Experiment.Experience
objects 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.Experience
object. Cannot be null. - Since:
- 0.5
-
isOn
boolean isOn()Is this experiment currently online, as provided by the/experiments[]/isOn
key. 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[]/hooks
key.- Returns:
- An immutable list of
ExperimentHook
objects in ordinal order. - Since:
- 0.7
-
getOnStates
List<Experiment.OnState> getOnStates()List of this experiment's state instrumentations, as provided by the/experiments[]/onStates
key.- 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[]/concurrentWith
key.- 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[]/timeToLive
key.- Since:
- 0.10
-
getParameters
Experiment parameters defined by this experiment.- Returns:
- An immutable map of experiment parameters.
- Since:
- 1.0
-