Enum Class WorkloadType

java.lang.Object
java.lang.Enum<WorkloadType>
dev.roanh.gmark.core.WorkloadType
All Implemented Interfaces:
Serializable, Comparable<WorkloadType>, Constable

public enum WorkloadType extends Enum<WorkloadType>
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
    Enum Constant
    Description
    Implementation of a workload that uses conjunctive path queries (CPQ) to fill conjuncts.
    Implementation of a workload that uses regular path queries (RPQ) to fill conjuncts.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    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

    Constructors
    Modifier
    Constructor
    Description
    private
    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 Type
    Method
    Description
    The ID of this workload type as used in configuration files.
    Gets the display name of this workload type.
    static final Workload
    parse(Element elem, Schema schema)
    Parses a workload configuration from the given configuration file element and for the given graph schema.
    Returns the enum constant of this class with the specified name.
    static WorkloadType[]
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • RPQ

      public static final WorkloadType RPQ
      Implementation of a workload that uses regular path queries (RPQ) to fill conjuncts.
    • CPQ

      public static final WorkloadType CPQ
      Implementation of a workload that uses conjunctive path queries (CPQ) to fill conjuncts.
  • Field Details

    • id

      private String id
      The ID of this workload (as used in configuration files).
    • constructor

      private BiFunction<Element,Schema,Workload> constructor
      A function to construct a new workload of this type from a given configuration file element and graph schema.
  • Constructor Details

    • WorkloadType

      private 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.
      Parameters:
      id - The workload ID.
      ctor - The workload instance constructor.
  • Method Details

    • values

      public static WorkloadType[] 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

      public static WorkloadType valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • getName

      public String getName()
      Gets the display name of this workload type.
      Returns:
      The display name of this workload type.
    • getID

      public String getID()
      The ID of this workload type as used in configuration files.
      Returns:
      The ID of this workload type.
    • parse

      public static final Workload parse(Element elem, Schema schema)
      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.