Constructor and Description |
---|
Domain(SegmentInfo info,
Set<Layer> layers) |
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 Domain(SegmentInfo info, Set<Layer> layers)
public int getId()
Segment
Segment
instance in the current ExperimentSpace
.public int getLayerId()
Segment
Layer
that owns this Segment
.getLayerId
in interface Segment
public SortedSet<Integer> getBuckets()
Segment
getBuckets
in interface Segment
public long getStartTimeMsec()
Segment
getStartTimeMsec
in interface Segment
public long getEndTimeMsec()
Segment
getEndTimeMsec
in interface Segment
public boolean isEnabled(long requestTimeMsec)
Segment
public void disable()
Segment
public boolean isValidFor(ExperimentState state)
Segment
ExperimentState
satisfies the Condition
instances associated with
this Segment
.isValidFor
in interface Segment
state
- the current ExperimentState
public void handle(ExperimentState state, List<DiversionCriterion> diversionCriteria, Map<String,FlagValueCalculator<Object>> overrides, Set<Integer> newExperimentIds)
Segment
overrides
and update newExperimentIds
with the ids of any experiments
that this request was diverted into.Copyright © 2013. All rights reserved.