public class AvroExperimentSpaceDeserializer extends ExperimentSpaceDeserializer
Constructor and Description |
---|
AvroExperimentSpaceDeserializer(boolean avroFileInput) |
Modifier and Type | Method and Description |
---|---|
protected com.google.common.base.Optional<ExperimentSpace> |
deserialize(ExperimentSpace.Serialized serialized)
Attempts to convert the
ExperimentSpace.Serialized data to an ExperimentSpace , returning
Optional.absent() in the case that the deserialization could not be
performed. |
protected static SortedSet<Integer> |
getBuckets(List<Integer> buckets,
List<BucketRange> bucketRanges) |
protected Condition<ExperimentState> |
getCondition(List<ConditionDefinition> definitions,
ConditionOperator operator) |
protected <T> List<Modifier<T>> |
getModifiers(List<ModifierDefinition> definitions,
FlagTypeParser<T> parser) |
protected static <T> AssociativeOperator<T> |
getOperatorFunction(ModifierOperator operator,
FlagTypeParser<T> parser) |
protected Map<String,FlagValueOverride<Object>> |
getOverrides(List<OverrideDefinition> overrides,
Map<String,FlagTypeParser<Object>> parsers,
int experimentId) |
ExperimentSpace |
load(ExperimentDeployment deployment,
String versionIdentifier) |
getConditionFactory, getExperimentFlags, initialize
public AvroExperimentSpaceDeserializer(boolean avroFileInput)
protected com.google.common.base.Optional<ExperimentSpace> deserialize(ExperimentSpace.Serialized serialized) throws IOException
ExperimentSpaceDeserializer
ExperimentSpace.Serialized
data to an ExperimentSpace
, returning
Optional.absent()
in the case that the deserialization could not be
performed.deserialize
in class ExperimentSpaceDeserializer
serialized
- the serialized form of an ExperimentSpace
ExperimentSpace
or an Optional.absent()
instanceIOException
- if there is an issue reading the serialized datapublic ExperimentSpace load(ExperimentDeployment deployment, String versionIdentifier)
protected Map<String,FlagValueOverride<Object>> getOverrides(List<OverrideDefinition> overrides, Map<String,FlagTypeParser<Object>> parsers, int experimentId) throws ValidationException
ValidationException
protected static SortedSet<Integer> getBuckets(List<Integer> buckets, List<BucketRange> bucketRanges)
protected <T> List<Modifier<T>> getModifiers(List<ModifierDefinition> definitions, FlagTypeParser<T> parser) throws ValidationException
ValidationException
protected Condition<ExperimentState> getCondition(List<ConditionDefinition> definitions, ConditionOperator operator) throws ValidationException
ValidationException
protected static <T> AssociativeOperator<T> getOperatorFunction(ModifierOperator operator, FlagTypeParser<T> parser)
Copyright © 2013. All rights reserved.