Enum ExecutionEnvironmentField

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<ExecutionEnvironmentField>

    public enum ExecutionEnvironmentField
    extends java.lang.Enum<ExecutionEnvironmentField>
    A wrapper for config fields that also provides value validation and type checking
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void checkType​(java.lang.Object o)
      Checks that a given type matches the type of o
      ConfigField getField()  
      <T extends ConfigField>
      T
      getField​(java.lang.Class<T> expectedClass)
      gets the ConfigField, ensuring it is of type expectedClass
      java.lang.Class<?> getType()  
      boolean isPoolBound()  
      static ExecutionEnvironmentField valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static ExecutionEnvironmentField[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      void verify​(java.lang.Object value)
      checks that the type matches the one of value and then checks the validity using the provided validators
      • Methods inherited from class java.lang.Enum

        compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

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

      • NUM_THREADS_PER_TASK

        public static final ExecutionEnvironmentField NUM_THREADS_PER_TASK
        Wrapper for NUM_IO_THREADS_PER_TASK, must be a positive integer
      • MAX_NUM_THREADS

        public static final ExecutionEnvironmentField MAX_NUM_THREADS
        Wrapper for Field.MAX_THREADS, must be a positive integer
      • UPDATE_CONSISTENCY_MODEL

        public static final ExecutionEnvironmentField UPDATE_CONSISTENCY_MODEL
        Wrapper for PgxConfig.Field.DEFAULT_IN_PLACE_UPDATE_CONSISTENCY_MODEL, no validators
    • Method Detail

      • values

        public static ExecutionEnvironmentField[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (ExecutionEnvironmentField c : ExecutionEnvironmentField.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static ExecutionEnvironmentField valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • isPoolBound

        public boolean isPoolBound()
      • getField

        public <T extends ConfigField> T getField​(java.lang.Class<T> expectedClass)
        gets the ConfigField, ensuring it is of type expectedClass
        Parameters:
        expectedClass - the expected class of the ConfigField
        Returns:
        field cast to the expected class
        Throws:
        java.lang.IllegalArgumentException - if field is not assignable to expectedClass
      • checkType

        public void checkType​(java.lang.Object o)
        Checks that a given type matches the type of o
        Parameters:
        o - an object of the type that is checked against
        Throws:
        java.lang.IllegalArgumentException - if field is not assignable to the type of o
      • verify

        public void verify​(java.lang.Object value)
        checks that the type matches the one of value and then checks the validity using the provided validators
      • getType

        public java.lang.Class<?> getType()
        Returns:
        the type of the field