public interface Assignments
Modifier and Type | Method and Description |
---|---|
Boolean |
checkMutex(Experiment experiment,
User.ID userID,
Context context)
Check if a user is in an experiment which is mutually exclusive with the given experiment
|
List<Map> |
doBatchAssignments(User.ID userID,
Application.Name applicationName,
Context context,
boolean createAssignment,
boolean overwrite,
javax.ws.rs.core.HttpHeaders headers,
ExperimentBatch experimentBatch,
Page.Name pageName,
Map<Experiment.ID,Boolean> allowAssignments)
Insert/update a user assignment for this experiment.
|
List<Map> |
doPageAssignments(Application.Name applicationName,
Page.Name pageName,
User.ID userID,
Context context,
boolean createAssignment,
boolean ignoreSamplingPercent,
javax.ws.rs.core.HttpHeaders headers,
SegmentationProfile segmentationProfile)
Gets assignments for a User based on the application name and the page.
|
boolean |
doSegmentTest(Application.Name applicationName,
Experiment.Label experimentLabel,
Context context,
SegmentationProfile segmentationProfile,
javax.ws.rs.core.HttpHeaders headers)
This method returns true if the input segmentation profile matches the rule in the experiment.
|
Assignment |
getAssignment(User.ID userID,
Application.Name appLabel,
Experiment.Label experimentLabel,
Context context,
boolean createAssignment,
boolean ignoreSamplingPercent,
SegmentationProfile segmentationProfile,
javax.ws.rs.core.HttpHeaders headers)
Return an existing assignment for a user, or potentially create a new
assignment if the user is assignable to this experiment
|
Assignment |
getAssignment(User.ID userID,
Application.Name applicationName,
Experiment.Label label,
Context context,
boolean createAssignment,
boolean ignoreSamplingPercent,
SegmentationProfile segmentationProfile,
javax.ws.rs.core.HttpHeaders headers,
Page.Name pageName,
Experiment experiment,
BucketList bucketList,
com.google.common.collect.Table<Experiment.ID,Experiment.Label,String> userAssignments,
Map<Experiment.ID,List<Experiment.ID>> exclusives)
Return an existing assignment for a user, or potentially create a new
assignment if the user is assignable to this experiment.
|
javax.ws.rs.core.StreamingOutput |
getAssignmentStream(Experiment.ID experimentID,
Context context,
Parameters parameters,
Boolean ignoreNullBucket)
Export assignments data for a given experiment ID.
|
Bucket |
getBucket(Experiment.ID experimentID,
Bucket.Label bucketLabel)
This method returns the
Bucket for a given experiment ID and bucketLabel. |
Assignment |
getSingleAssignment(User.ID userID,
Application.Name appLabel,
Experiment.Label experimentLabel,
Context context,
boolean createAssignment,
boolean ignoreSamplingPercent,
SegmentationProfile segmentationProfile,
javax.ws.rs.core.HttpHeaders headers,
Page.Name pageName)
Gets the Assignment for one user for an specific experiment.
|
Assignment |
putAssignment(User.ID userID,
Application.Name applicationName,
Experiment.Label experimentLabel,
Context context,
Bucket.Label desiredBucketLabel,
boolean overwrite)
Insert/update a user assignment for this experiment.
|
Map<String,Integer> |
queuesLength()
Holds the length of queues stored in rule cache and ingestion executors.
|
Map<String,Integer> queuesLength()
Assignment getSingleAssignment(User.ID userID, Application.Name appLabel, Experiment.Label experimentLabel, Context context, boolean createAssignment, boolean ignoreSamplingPercent, SegmentationProfile segmentationProfile, javax.ws.rs.core.HttpHeaders headers, Page.Name pageName)
userID
- the User.ID
of the person we want the assignment forappLabel
- the Application.Name
the app we want the assignment forexperimentLabel
- the Experiment.Label
the experimentcontext
- the Context
of the assignment callcreateAssignment
- true
when a new Assignment should be createdignoreSamplingPercent
- true
if we want to have an assignment independent of the sampling ratesegmentationProfile
- the SegmentationProfile
to be used for the assignmentheaders
- the HttpHeaders
that can be used by the segmentationpageName
- the Page.Name
the page name for the assignmentAssignment
Assignment getAssignment(User.ID userID, Application.Name appLabel, Experiment.Label experimentLabel, Context context, boolean createAssignment, boolean ignoreSamplingPercent, SegmentationProfile segmentationProfile, javax.ws.rs.core.HttpHeaders headers)
userID
- the User.ID
of the person we want the assignment forappLabel
- the Application.Name
the app we want the assignment forexperimentLabel
- the Experiment.Label
the experimentcontext
- the Context
of the assignment callcreateAssignment
- true
when a new Assignment should be createdignoreSamplingPercent
- true
if we want to have an assignment independent of the sampling ratesegmentationProfile
- the SegmentationProfile
to be used for the assignmentheaders
- the HttpHeaders
that can be used by the segmentationAssignment
Assignment getAssignment(User.ID userID, Application.Name applicationName, Experiment.Label label, Context context, boolean createAssignment, boolean ignoreSamplingPercent, SegmentationProfile segmentationProfile, javax.ws.rs.core.HttpHeaders headers, Page.Name pageName, Experiment experiment, BucketList bucketList, com.google.common.collect.Table<Experiment.ID,Experiment.Label,String> userAssignments, Map<Experiment.ID,List<Experiment.ID>> exclusives)
userID
- the User.ID
of the person we want the assignment forapplicationName
- the Application.Name
the app we want the assignment forlabel
- the Experiment.Label
the experimentcontext
- the Context
of the assignment callcreateAssignment
- true
when a new Assignment should be createdignoreSamplingPercent
- true
if we want to have an assignment independent of the sampling ratesegmentationProfile
- the SegmentationProfile
to be used for the assignmentheaders
- the HttpHeaders
that can be used by the segmentationpageName
- the Page.Name
the page name for the assignmentexperiment
- the Experiment
we want the assignment forbucketList
- list of Buckets of this ExperimentuserAssignments
- the already existing assignmentsexclusives
- the experiments that are excluded from the assignmentAssignment
Assignment putAssignment(User.ID userID, Application.Name applicationName, Experiment.Label experimentLabel, Context context, Bucket.Label desiredBucketLabel, boolean overwrite)
userID
- the User.ID
of the person we want the assignment forapplicationName
- the Application.Name
the app we want the assignment forexperimentLabel
- the Experiment.Label
the experimentcontext
- the Context
of the assignment calldesiredBucketLabel
- the Bucket.Label
the assignment should go tooverwrite
- true
if the assignment should be forced for existing assignmentsAssignment
List<Map> doBatchAssignments(User.ID userID, Application.Name applicationName, Context context, boolean createAssignment, boolean overwrite, javax.ws.rs.core.HttpHeaders headers, ExperimentBatch experimentBatch, Page.Name pageName, Map<Experiment.ID,Boolean> allowAssignments)
userID
- the User.ID
of the person we want the assignment forapplicationName
- the Application.Name
the app we want the assignment forcontext
- the Context
of the assignment callcreateAssignment
- true
when a new Assignment should be createdoverwrite
- true
if the assignment should be forced for existing assignmentsheaders
- the HttpHeaders
that can be used by the segmentationexperimentBatch
- the ExperimentBatch
experiment batch for batch assignmentspageName
- the Page.Name
the page name for the assignmentallowAssignments
- HashMap
for each experiment whether the assignment is allowedAssignment
Boolean checkMutex(Experiment experiment, User.ID userID, Context context)
experiment
- the Experiment
the mutual exclusion should be checked foruserID
- the User.ID
for the mutual exclusion checkcontext
- the Context
in which we want to check the mutual exclusiontrue
if this user is assigned to a mutual exclusive experimentjavax.ws.rs.core.StreamingOutput getAssignmentStream(Experiment.ID experimentID, Context context, Parameters parameters, Boolean ignoreNullBucket)
experimentID
- the Experiment.ID
context
- the Context
parameters
- the parameters Parameters
ignoreNullBucket
- the boolean flag of whether to ignroe null bucketStreamingOutput
for the Assignment DataList<Map> doPageAssignments(Application.Name applicationName, Page.Name pageName, User.ID userID, Context context, boolean createAssignment, boolean ignoreSamplingPercent, javax.ws.rs.core.HttpHeaders headers, SegmentationProfile segmentationProfile)
applicationName
- the Application.Name
the app we want the assignment forpageName
- the Page.Name
the page name for the assignmentuserID
- the User.ID
of the person we want the assignment forcontext
- the Context
of the assignment callcreateAssignment
- true
when a new Assignment should be createdignoreSamplingPercent
- true
if the assignment should be forcedheaders
- the HttpHeaders
that can be used by the segmentationsegmentationProfile
- SegmentationProfile
for the Assignment resolutionList
of HashMap
s for the generated assignmentsBucket getBucket(Experiment.ID experimentID, Bucket.Label bucketLabel)
Bucket
for a given experiment ID and bucketLabel.experimentID
- the Experiment.ID
bucketLabel
- the Bucket.Label
boolean doSegmentTest(Application.Name applicationName, Experiment.Label experimentLabel, Context context, SegmentationProfile segmentationProfile, javax.ws.rs.core.HttpHeaders headers)
applicationName
- the Application.Name
the app we want the assignment forexperimentLabel
- the Experiment.Label
the experimentcontext
- the Context
of the assignment callsegmentationProfile
- the SegmentationProfile
to be used for the assignmentheaders
- the HttpHeaders
that can be used by the segmentationCopyright © 2016. All rights reserved.