| Constructor and Description |
|---|
ExperimentInfo(SegmentInfo info,
Map<String,FlagValueCalculatorImpl<Object>> baseOverrides,
Map<Integer,Map<String,FlagValueCalculatorImpl<Object>>> launchOverrides) |
| Modifier and Type | Method and Description |
|---|---|
void |
disable()
Turn off this segment, preventing it from diverting requests.
|
SortedSet<Integer> |
getBuckets()
|
long |
getEndTimeMsec()
Returns the time in milliseconds UTC that this segment stops diverting requests.
|
int |
getId()
The unique id of this
Segment instance in the current ExperimentSpace. |
int |
getLayerId()
The unique id of the
Layer that owns this Segment. |
long |
getStartTimeMsec()
Returns the time in milliseconds UTC that this segment starts diverting requests.
|
void |
handle(ExperimentState state,
List<DiversionCriterion> diversionCriteria,
Map<String,FlagValueCalculator<Object>> overrides,
Set<Integer> newExperimentIds)
Modify the given
overrides and update newExperimentIds with the ids of any experiments
that this request was diverted into. |
boolean |
isEnabled(long requestTimeMsec)
Returns true if this instance is enabled and capable of diverting requests at the given time.
|
boolean |
isValidFor(ExperimentState state)
Returns true if the given
ExperimentState satisfies the Condition instances associated with
this Segment. |
public ExperimentInfo(SegmentInfo info, Map<String,FlagValueCalculatorImpl<Object>> baseOverrides, Map<Integer,Map<String,FlagValueCalculatorImpl<Object>>> launchOverrides)
public int getId()
SegmentSegment instance in the current ExperimentSpace.public int getLayerId()
SegmentLayer that owns this Segment.getLayerId in interface Segmentpublic SortedSet<Integer> getBuckets()
SegmentgetBuckets in interface Segmentpublic long getStartTimeMsec()
SegmentgetStartTimeMsec in interface Segmentpublic long getEndTimeMsec()
SegmentgetEndTimeMsec in interface Segmentpublic boolean isEnabled(long requestTimeMsec)
Segmentpublic void disable()
Segmentpublic boolean isValidFor(ExperimentState state)
SegmentExperimentState satisfies the Condition instances associated with
this Segment.isValidFor in interface Segmentstate - the current ExperimentStatepublic void handle(ExperimentState state, List<DiversionCriterion> diversionCriteria, Map<String,FlagValueCalculator<Object>> overrides, Set<Integer> newExperimentIds)
Segmentoverrides and update newExperimentIds with the ids of any experiments
that this request was diverted into.Copyright © 2013. All rights reserved.