Package dev.roanh.gmark.core
Enum Class WorkloadType
- All Implemented Interfaces:
Serializable
,Comparable<WorkloadType>
,Constable
Enum specifying all the different concrete workload types.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum Constants -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate BiFunction<Element,
Schema, Workload> A function to construct a new workload of this type from a given configuration file element and graph schema.private String
The ID of this workload (as used in configuration files). -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
WorkloadType
(String id, BiFunction<Element, Schema, Workload> ctor) Constructs a new workload type with the given ID and given function to construct a new workload instance from a configuration file element and graph schema. -
Method Summary
Modifier and TypeMethodDescriptiongetID()
The ID of this workload type as used in configuration files.getName()
Gets the display name of this workload type.static final Workload
Parses a workload configuration from the given configuration file element and for the given graph schema.static WorkloadType
Returns the enum constant of this class with the specified name.static WorkloadType[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
RPQ
Implementation of a workload that uses regular path queries (RPQ) to fill conjuncts. -
CPQ
Implementation of a workload that uses conjunctive path queries (CPQ) to fill conjuncts.
-
-
Field Details
-
id
The ID of this workload (as used in configuration files). -
constructor
A function to construct a new workload of this type from a given configuration file element and graph schema.
-
-
Constructor Details
-
WorkloadType
Constructs a new workload type with the given ID and given function to construct a new workload instance from a configuration file element and graph schema.- Parameters:
id
- The workload ID.ctor
- The workload instance constructor.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
getName
Gets the display name of this workload type.- Returns:
- The display name of this workload type.
-
getID
The ID of this workload type as used in configuration files.- Returns:
- The ID of this workload type.
-
parse
Parses a workload configuration from the given configuration file element and for the given graph schema.Note: unrecognised workloads are parsed as
RPQ
for backwards compatibility reasons with the original version of gMark.- Parameters:
elem
- The configuration file element to parse.schema
- The graph schema to use.- Returns:
- The parsed workload configuration.
-