Package com.variant.share.schema
Interface Schema
public interface Schema
Representation of a experiment schema. The top-level object encapsulating a deployable schema document.
- Since:
- 0.5
-
Method Summary
Modifier and TypeMethodDescriptionThe schema's description.getExperiment(String name) Get a experiment by its name.This schema's experiments.This schema's trace event flusher.getHooks()List of schema-scoped lifecycle hooks.getName()The schema's name.Get a state by its name.This schema's states.
-
Method Details
-
getName
String getName()The schema's name. Specified in the required/namekey.- Since:
- 0.9
-
getDescription
The schema's description. Specified in the optional/descriptionkey.- Since:
- 0.9
-
getHooks
List<SchemaHook> getHooks()List of schema-scoped lifecycle hooks. Specified in the optional/hookskey.- Since:
- 0.9
-
getFlusher
Optional<EventFlusher> getFlusher()This schema's trace event flusher. Specified in the optional/flusherkey. If no flusher is specified in the schema, this method will return an emptyOptional, and a configurable server-wide default is used at run time.- Since:
- 0.9
-
getStates
This schema's states. Specified in the required/stateskey.- Returns:
- An immutable list of
Stateobjects in ordinal order. - Since:
- 0.5
-
getState
Get a state by its name.- Returns:
- An
Optional, containing the state with the given name, if exists, or empty if no such state is present in the schema. - Since:
- 0.5
-
getExperiments
List<Experiment> getExperiments()This schema's experiments. Specified in the required/experimentskey.- Returns:
- An immutable list of
Experimentobjects in ordinal order. - Since:
- 0.5
-
getExperiment
Get a experiment by its name.- Returns:
- An
Optional, containing the experiment with the given name, if exists, or empty if no such experiment is present in the schema. - Since:
- 0.5
-