Package com.arcadedb

Enum GlobalConfiguration

    • Method Detail

      • values

        public static GlobalConfiguration[] 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 (GlobalConfiguration c : GlobalConfiguration.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static GlobalConfiguration valueOf​(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:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • resetAll

        public static void resetAll()
        Reset all the configurations to the default values.
      • reset

        public void reset()
        Reset the configuration to the default value.
      • dumpConfiguration

        public static void dumpConfiguration​(PrintStream out)
      • fromJSON

        public static void fromJSON​(String input)
      • toJSON

        public static String toJSON()
      • findByKey

        public static GlobalConfiguration findByKey​(String iKey)
        Find the OGlobalConfiguration instance by the key. Key is case insensitive.
        Parameters:
        iKey - Key to find. It's case insensitive.
        Returns:
        OGlobalConfiguration instance if found, otherwise null
      • setConfiguration

        public static void setConfiguration​(Map<String,​Object> iConfig)
        Changes the configuration values in one shot by passing a Map of values. Keys can be the Java ENUM names or the string representation of configuration values
      • getValue

        public <T> T getValue()
      • isChanged

        public boolean isChanged()
        Returns:
        true if configuration was changed from default value and false otherwise.
      • getValueAsEnum

        public <T extends Enum<T>> T getValueAsEnum​(Class<T> enumType)
        Returns:
        Value of configuration parameter stored as enumeration if such one exists.
        Throws:
        ClassCastException - if stored value can not be casted and parsed from string to passed in enumeration class.
        IllegalArgumentException - if value associated with configuration parameter is a string bug can not be converted to instance of passed in enumeration class.
      • setValue

        public void setValue​(Object iValue)
      • getValueAsBoolean

        public boolean getValueAsBoolean()
      • getValueAsString

        public String getValueAsString()
      • getValueAsInteger

        public int getValueAsInteger()
      • getValueAsLong

        public long getValueAsLong()
      • getValueAsFloat

        public float getValueAsFloat()
      • getKey

        public String getKey()
      • isChangeableAtRuntime

        public Boolean isChangeableAtRuntime()
      • isHidden

        public boolean isHidden()
      • getDefValue

        public Object getDefValue()
      • getType

        public Class<?> getType()
      • getDescription

        public String getDescription()