Class WorkloadRPQ
java.lang.Object
dev.roanh.gmark.core.Workload
dev.roanh.gmark.query.conjunct.rpq.WorkloadRPQ
- All Implemented Interfaces:
IDable
Describes a workload of RPQ queries to generate.
-
Field Summary
Modifier and TypeFieldDescriptionprivate int
The maximum number of disjuncts in the RPQs to generate.private int
The maximum length of hte RPQs to generate.private int
The minimum number of disjuncts in the RPQs to generate.private int
The minimum length of the RPQs to generate. -
Constructor Summary
ConstructorDescriptionWorkloadRPQ
(Element elem, Schema schema) Constructs a new RPQ workload from the given configuration element and graph schema. -
Method Summary
Modifier and TypeMethodDescriptionGets a generator for generating conjuncts according to this workload configuration.int
Gets the maximum number of disjuncts in the RPQs to generate.int
Gets the maximum length of the RPQs to generate.int
Gets the maximum length of paths needed in the selectivity graph to generate queries in accordance with this workload.int
Gets the minimum number of disjuncts in the RPQs to generate.int
Gets the minimum length of the RPQs to generate.getType()
Gets the type of this workload.void
setMaxDisjuncts
(int disj) Sets the maximum number of disjuncts in the RPQs to generate.void
setMaxLength
(int len) Sets the maximum length of the RPQs to generate.void
setMinDisjuncts
(int disj) Sets the minimum number of disjuncts in the RPQs to generate.void
setMinLength
(int len) Sets the minimum length of the RPQs to generate.void
validate()
Validates this workload by checking that all of the arguments are valid and usable for query generation.Methods inherited from class dev.roanh.gmark.core.Workload
addSelectivities, addShapes, generateQueries, generateSingleQuery, getGraphSchema, getID, getMaxArity, getMaxConjuncts, getMinArity, getMinConjuncts, getSelectivities, getShapes, getSize, getStarProbability, removeSelectivities, removeShapes, setMaxArity, setMaxConjuncts, setMinArity, setMinConjuncts, setSize, setStarProbability
-
Field Details
-
minDisjuncts
private int minDisjunctsThe minimum number of disjuncts in the RPQs to generate. -
maxDisjuncts
private int maxDisjunctsThe maximum number of disjuncts in the RPQs to generate. -
minLength
private int minLengthThe minimum length of the RPQs to generate. -
maxLength
private int maxLengthThe maximum length of hte RPQs to generate.
-
-
Constructor Details
-
WorkloadRPQ
Constructs a new RPQ workload from the given configuration element and graph schema.- Parameters:
elem
- The configuration element to parse.schema
- The graph schema to use.
-
-
Method Details
-
setMaxLength
public void setMaxLength(int len) Sets the maximum length of the RPQs to generate.- Parameters:
len
- The new maximum length.
-
setMinLength
public void setMinLength(int len) Sets the minimum length of the RPQs to generate.- Parameters:
len
- The new minimum length.
-
setMaxDisjuncts
public void setMaxDisjuncts(int disj) Sets the maximum number of disjuncts in the RPQs to generate.- Parameters:
disj
- The new maximum disjunct count.
-
setMinDisjuncts
public void setMinDisjuncts(int disj) Sets the minimum number of disjuncts in the RPQs to generate.- Parameters:
disj
- The new minimum disjunct count.
-
getMaxLength
public int getMaxLength()Gets the maximum length of the RPQs to generate.- Returns:
- The maximum RPQ length.
-
getMinLength
public int getMinLength()Gets the minimum length of the RPQs to generate.- Returns:
- The minimum RPQ length.
-
getMinDisjuncts
public int getMinDisjuncts()Gets the minimum number of disjuncts in the RPQs to generate.- Returns:
- The minimum number of disjuncts.
-
getMaxDisjuncts
public int getMaxDisjuncts()Gets the maximum number of disjuncts in the RPQs to generate.- Returns:
- The maximum number of disjuncts.
-
validate
Description copied from class:Workload
Validates this workload by checking that all of the arguments are valid and usable for query generation. Subclasses should override this method to validate their own arguments.- Overrides:
validate
in classWorkload
- Throws:
IllegalStateException
- When it is determined that the workload is not valid.
-
getType
Description copied from class:Workload
Gets the type of this workload. -
getMaxSelectivityGraphLength
public int getMaxSelectivityGraphLength()Description copied from class:Workload
Gets the maximum length of paths needed in the selectivity graph to generate queries in accordance with this workload.- Specified by:
getMaxSelectivityGraphLength
in classWorkload
- Returns:
- The maximum required selectivity graph path length.
-
getConjunctGenerator
Description copied from class:Workload
Gets a generator for generating conjuncts according to this workload configuration.- Specified by:
getConjunctGenerator
in classWorkload
- Returns:
- A worklaod conjunct generator.
-