Enum Class TaskScope

java.lang.Object
java.lang.Enum<TaskScope>
org.voltdb.task.TaskScope
All Implemented Interfaces:
Serializable, Comparable<TaskScope>, Constable

public enum TaskScope extends Enum<TaskScope>
Enum to represent the different scopes in which a Task can run
  • Enum Constant Details

    • DATABASE

      public static final TaskScope DATABASE
    • HOSTS

      public static final TaskScope HOSTS
    • PARTITIONS

      public static final TaskScope PARTITIONS
  • Method Details

    • values

      public static TaskScope[] 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 TaskScope 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
    • fromId

      public static TaskScope fromId(byte id)
      Convert from an ID returned by getId() back to the TaskScope instance
      Parameters:
      id - of a TaskScope
      Returns:
      Instance of TaskScope id references
      Throws:
      IllegalArgumentException - If id is not a valid ID
    • fromName

      public static TaskScope fromName(String name)
      Convert the name of a scope to a TaskScope instance in a case insensitive way. If name is null return the default scope, DATABASE
      Parameters:
      name - of scope or null
      Returns:
      Instance of TaskScope
      Throws:
      IllegalArgumentException - If name is not a valid scope
    • translateIdToName

      public static String translateIdToName(byte id)
      Convert a scope ID to the name of that scope
      Parameters:
      id - of a TaskScope
      Returns:
      Name of scope id references
      Throws:
      IllegalArgumentException - If id is not a valid ID
    • getId

      public byte getId()
      Returns:
      The ID of this scope