Class EnvVariables

java.lang.Object
org.hobbit.utils.EnvVariables

@Deprecated public class EnvVariables extends Object
Deprecated.
Use HobbitConfiguration instead.
A simple class offering static access to environmental variables.
Author:
Michael Röder (michael.roeder@uni-paderborn.de)
  • Constructor Summary

    Constructors
    Constructor
    Description
    Deprecated.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    Deprecated.
    Returns the value of the environmental variable with the given name as boolean or throws an IllegalStateException if the variable can not be found or an error occurs.
    static boolean
    getBoolean(String name, boolean defaultValue)
    Deprecated.
    Returns the value of the environmental variable with the given name as boolean or the default value if the variable can not be found or an error occurs.
    static boolean
    getBoolean(String name, boolean defaultValue, org.slf4j.Logger logger)
    Deprecated.
    Returns the value of the environmental variable with the given name as boolean or the default value if the variable can not be found or an error occurs.
    static boolean
    getBoolean(String name, Supplier<Boolean> defaultValueFactory)
    Deprecated.
    Returns the value of the environmental variable with the given name as boolean or the default value if the variable can not be found or an error occurs.
    static boolean
    getBoolean(String name, Supplier<Boolean> defaultValueFactory, org.slf4j.Logger logger)
    Deprecated.
    Returns the value of the environmental variable with the given name as boolean or the default value if the variable can not be found or an error occurs.
    static boolean
    getBoolean(String name, org.slf4j.Logger logger)
    Deprecated.
    Returns the value of the environmental variable with the given name as boolean or throws an IllegalStateException if the variable can not be found or an error occurs.
    protected static boolean
    getBooleanValue(String name, boolean defaultValue, org.slf4j.Logger logger, boolean exceptionWhenFailing, boolean hasDefaultValue)
    Deprecated.
    Internal method defining the default value factory function before calling getBooleanValue(String, Supplier, Logger, boolean).
    protected static boolean
    getBooleanValue(String name, Supplier<Boolean> defaultValueFactory, org.slf4j.Logger logger, boolean exceptionWhenFailing)
    Deprecated.
    Internal method defining the conversion function before calling getVariableValue(String, Function, Supplier, Logger, boolean).
    static int
    getInt(String name)
    Deprecated.
    Returns the value of the environmental variable with the given name as int or throws an IllegalStateException if the variable can not be found or an error occurs.
    static int
    getInt(String name, int defaultValue)
    Deprecated.
    Returns the value of the environmental variable with the given name as int or the default value if the variable can not be found or an error occurs.
    static int
    getInt(String name, int defaultValue, org.slf4j.Logger logger)
    Deprecated.
    Returns the value of the environmental variable with the given name as int or the default value if the variable can not be found or an error occurs.
    static int
    getInt(String name, Supplier<Integer> defaultValueFactory)
    Deprecated.
    Returns the value of the environmental variable with the given name as int or the default value if the variable can not be found or an error occurs.
    static int
    getInt(String name, Supplier<Integer> defaultValueFactory, org.slf4j.Logger logger)
    Deprecated.
    Returns the value of the environmental variable with the given name as int or the default value if the variable can not be found or an error occurs.
    static int
    getInt(String name, org.slf4j.Logger logger)
    Deprecated.
    Returns the value of the environmental variable with the given name as int or throws an IllegalStateException if the variable can not be found or an error occurs.
    protected static int
    getIntValue(String name, int defaultValue, org.slf4j.Logger logger, boolean exceptionWhenFailing, boolean hasDefaultValue)
    Deprecated.
    Internal method defining the default value factory function before calling getIntValue(String, Supplier, Logger, boolean).
    protected static int
    getIntValue(String name, Supplier<Integer> defaultValueFactory, org.slf4j.Logger logger, boolean exceptionWhenFailing)
    Deprecated.
    Internal method defining the conversion function before calling getVariableValue(String, Function, Supplier, Logger, boolean).
    static long
    Deprecated.
    Returns the value of the environmental variable with the given name as long or throws an IllegalStateException if the variable can not be found or an error occurs.
    static long
    getLong(String name, long defaultValue)
    Deprecated.
    Returns the value of the environmental variable with the given name as long or the default value if the variable can not be found or an error occurs.
    static long
    getLong(String name, long defaultValue, org.slf4j.Logger logger)
    Deprecated.
    Returns the value of the environmental variable with the given name as long or the default value if the variable can not be found or an error occurs.
    static long
    getLong(String name, Supplier<Long> defaultValueFactory)
    Deprecated.
    Returns the value of the environmental variable with the given name as long or the default value if the variable can not be found or an error occurs.
    static long
    getLong(String name, Supplier<Long> defaultValueFactory, org.slf4j.Logger logger)
    Deprecated.
    Returns the value of the environmental variable with the given name as long or the default value if the variable can not be found or an error occurs.
    static long
    getLong(String name, org.slf4j.Logger logger)
    Deprecated.
    Returns the value of the environmental variable with the given name as long or throws an IllegalStateException if the variable can not be found or an error occurs.
    protected static long
    getLongValue(String name, long defaultValue, org.slf4j.Logger logger, boolean exceptionWhenFailing, boolean hasDefaultValue)
    Deprecated.
    Internal method defining the default value factory function before calling getVariableValue(String, Function, Supplier, Logger, boolean).
    protected static long
    getLongValue(String name, Supplier<Long> defaultValueFactory, org.slf4j.Logger logger, boolean exceptionWhenFailing)
    Deprecated.
    Internal method defining the conversion function before calling getVariableValue(String, Function, Supplier, Logger, boolean).
    static org.apache.jena.rdf.model.Model
    Deprecated.
    Returns the value of the environmental variable with the given name as Model or throws an IllegalStateException if the variable can not be found or an error occurs.
    static org.apache.jena.rdf.model.Model
    getModel(String name, Supplier<org.apache.jena.rdf.model.Model> defaultValueFactory)
    Deprecated.
    Returns the value of the environmental variable with the given name as Model or the default value if the variable can not be found or an error occurs.
    static org.apache.jena.rdf.model.Model
    getModel(String name, Supplier<org.apache.jena.rdf.model.Model> defaultValueFactory, org.slf4j.Logger logger)
    Deprecated.
    Returns the value of the environmental variable with the given name as Model or the default value if the variable can not be found or an error occurs.
    static org.apache.jena.rdf.model.Model
    getModel(String name, org.apache.jena.rdf.model.Model defaultValue)
    Deprecated.
    Returns the value of the environmental variable with the given name as Model or the default value if the variable can not be found or an error occurs.
    static org.apache.jena.rdf.model.Model
    getModel(String name, org.apache.jena.rdf.model.Model defaultValue, org.slf4j.Logger logger)
    Deprecated.
    Returns the value of the environmental variable with the given name as Model or the default value if the variable can not be found or an error occurs.
    static org.apache.jena.rdf.model.Model
    getModel(String name, org.slf4j.Logger logger)
    Deprecated.
    Returns the value of the environmental variable with the given name as Model or throws an IllegalStateException if the variable can not be found or an error occurs.
    protected static org.apache.jena.rdf.model.Model
    getModelValue(String name, Supplier<org.apache.jena.rdf.model.Model> defaultValueFactory, org.slf4j.Logger logger, boolean exceptionWhenFailing)
    Deprecated.
    Internal method defining the conversion function before calling getVariableValue(String, Function, Supplier, Logger, boolean).
    protected static org.apache.jena.rdf.model.Model
    getModelValue(String name, org.apache.jena.rdf.model.Model defaultValue, org.slf4j.Logger logger, boolean exceptionWhenFailing, boolean hasDefaultValue)
    Deprecated.
    Internal method defining the default value factory function before calling getModelValue(String, Supplier, Logger, boolean).
    static String
    Deprecated.
    Returns the value of the environmental variable with the given name as String or throws an IllegalStateException if the variable can not be found or an error occurs.
    static String
    getString(String name, String defaultValue)
    Deprecated.
    Returns the value of the environmental variable with the given name as String or the default value if the variable can not be found or an error occurs.
    static String
    getString(String name, String defaultValue, org.slf4j.Logger logger)
    Deprecated.
    Returns the value of the environmental variable with the given name as String or the default value if the variable can not be found or an error occurs.
    static String
    getString(String name, Supplier<String> defaultValueFactory)
    Deprecated.
    Returns the value of the environmental variable with the given name as String or the default value if the variable can not be found or an error occurs.
    static String
    getString(String name, Supplier<String> defaultValueFactory, org.slf4j.Logger logger)
    Deprecated.
    Returns the value of the environmental variable with the given name as String or the default value if the variable can not be found or an error occurs.
    static String
    getString(String name, org.slf4j.Logger logger)
    Deprecated.
    Returns the value of the environmental variable with the given name as String or throws an IllegalStateException if the variable can not be found or an error occurs.
    protected static String
    getStringValue(String name, String defaultValue, org.slf4j.Logger logger, boolean exceptionWhenFailing, boolean hasDefaultValue)
    Deprecated.
    Internal method defining the default value factory function before calling getStringValue(String, Supplier, Logger, boolean).
    protected static String
    getStringValue(String name, Supplier<String> defaultValueFactory, org.slf4j.Logger logger, boolean exceptionWhenFailing)
    Deprecated.
    Internal method defining the conversion function before calling getVariableValue(String, Function, Supplier, Logger, boolean).
    protected static <T> T
    getVariableValue(String name, Function<String,T> conversion, Supplier<T> defaultValueFactory, org.slf4j.Logger logger, boolean exceptionWhenFailing)
    Deprecated.
    Generic method for accessing an environmental variable which has the given name and will be transformed into the return type using the given conversion function.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • EnvVariables

      public EnvVariables()
      Deprecated.
  • Method Details

    • getVariableValue

      protected static <T> T getVariableValue(String name, Function<String,T> conversion, Supplier<T> defaultValueFactory, org.slf4j.Logger logger, boolean exceptionWhenFailing) throws IllegalStateException
      Deprecated.
      Generic method for accessing an environmental variable which has the given name and will be transformed into the return type using the given conversion function. The behavior in case of an error is defined by the given default value and Logger objects. If a problem occurs and a Logger is available, the error will be logged using the Logger.error(String) method. If exceptionWhenFailing is set to true an IllegalStateException is thrown. Else, if a defaultValueFactory is available, a default value will be returned. Otherwise null is returned.
      Parameters:
      name - name of the environmental variable which should be accessed
      conversion - the function which is used to convert the String of the variable value into the expected value type. It is assumed that this function will throw an exception if an error occurs.
      defaultValueFactory - A factory method which can be used to generate a default value which will be returned if the variable can not be found or if an error occurs.
      logger - the Logger which will be used to log errors if they occur.
      exceptionWhenFailing - flag indicating whether an exception should be thrown if an error occurs.
      Returns:
      the variable value converted to the expected value or the default value if an error occurred and a default value is available.
      Throws:
      IllegalStateException - if exceptionWhenFailing is set to true and one of the following two errors occurs: 1) the variable is not available or 2) the conversion function throws an exception.
    • getString

      public static String getString(String name) throws IllegalStateException
      Deprecated.
      Returns the value of the environmental variable with the given name as String or throws an IllegalStateException if the variable can not be found or an error occurs.
      Parameters:
      name - name of the environmental variable which should be accessed
      Returns:
      the variable value
      Throws:
      IllegalStateException - if the variable can not be found or an error occurs.
    • getString

      public static String getString(String name, String defaultValue)
      Deprecated.
      Returns the value of the environmental variable with the given name as String or the default value if the variable can not be found or an error occurs.
      Parameters:
      name - name of the environmental variable which should be accessed
      defaultValue - the default value which will be returned if the variable can not be found or if an error occurs.
      Returns:
      the variable value or the default value if an error occurred and a default value is available.
    • getString

      public static String getString(String name, Supplier<String> defaultValueFactory)
      Deprecated.
      Returns the value of the environmental variable with the given name as String or the default value if the variable can not be found or an error occurs.
      Parameters:
      name - name of the environmental variable which should be accessed
      defaultValueFactory - A factory method which can be used to generate a default value which will be returned if the variable can not be found or if an error occurs.
      Returns:
      the variable value or the default value if an error occurred and a default value is available.
    • getString

      public static String getString(String name, org.slf4j.Logger logger) throws IllegalStateException
      Deprecated.
      Returns the value of the environmental variable with the given name as String or throws an IllegalStateException if the variable can not be found or an error occurs.
      Parameters:
      name - name of the environmental variable which should be accessed
      logger - the Logger which will be used to log errors if they occur.
      Returns:
      the variable value
      Throws:
      IllegalStateException - if the variable can not be found or an error occurs.
    • getString

      public static String getString(String name, String defaultValue, org.slf4j.Logger logger)
      Deprecated.
      Returns the value of the environmental variable with the given name as String or the default value if the variable can not be found or an error occurs.
      Parameters:
      name - name of the environmental variable which should be accessed
      defaultValue - the default value which will be returned if the variable can not be found or if an error occurs.
      logger - the Logger which will be used to log errors if they occur.
      Returns:
      the variable value or the default value if an error occurred and a default value is available.
    • getString

      public static String getString(String name, Supplier<String> defaultValueFactory, org.slf4j.Logger logger)
      Deprecated.
      Returns the value of the environmental variable with the given name as String or the default value if the variable can not be found or an error occurs.
      Parameters:
      name - name of the environmental variable which should be accessed
      defaultValueFactory - A factory method which can be used to generate a default value which will be returned if the variable can not be found or if an error occurs.
      logger - the Logger which will be used to log errors if they occur.
      Returns:
      the variable value or the default value if an error occurred and a default value is available.
    • getStringValue

      protected static String getStringValue(String name, String defaultValue, org.slf4j.Logger logger, boolean exceptionWhenFailing, boolean hasDefaultValue) throws IllegalStateException
      Deprecated.
      Internal method defining the default value factory function before calling getStringValue(String, Supplier, Logger, boolean).
      Parameters:
      name - name of the environmental variable which should be accessed
      defaultValue - the default value which will be returned if the variable can not be found or if an error occurs.
      logger - the Logger which will be used to log errors if they occur.
      exceptionWhenFailing - flag indicating whether an exception should be thrown if an error occurs.
      hasDefaultValue - flag indicating whether a default value has been provided.
      Returns:
      the variable value converted to the expected value or the default value if an error occurred and a default value is available.
      Throws:
      IllegalStateException - if exceptionWhenFailing is set to true and one of the following two errors occurs: 1) the variable is not available or 2) the conversion function throws an exception.
    • getStringValue

      protected static String getStringValue(String name, Supplier<String> defaultValueFactory, org.slf4j.Logger logger, boolean exceptionWhenFailing) throws IllegalStateException
      Deprecated.
      Internal method defining the conversion function before calling getVariableValue(String, Function, Supplier, Logger, boolean).
      Parameters:
      name - name of the environmental variable which should be accessed
      defaultValueFactory - A factory method which can be used to generate a default value which will be returned if the variable can not be found or if an error occurs.
      logger - the Logger which will be used to log errors if they occur.
      exceptionWhenFailing - flag indicating whether an exception should be thrown if an error occurs.
      Returns:
      the variable value converted to the expected value or the default value if an error occurred and a default value is available.
      Throws:
      IllegalStateException - if exceptionWhenFailing is set to true and one of the following two errors occurs: 1) the variable is not available or 2) the conversion function throws an exception.
    • getModel

      public static org.apache.jena.rdf.model.Model getModel(String name) throws IllegalStateException
      Deprecated.
      Returns the value of the environmental variable with the given name as Model or throws an IllegalStateException if the variable can not be found or an error occurs.
      Parameters:
      name - name of the environmental variable which should be accessed
      Returns:
      the variable value
      Throws:
      IllegalStateException - if the variable can not be found or an error occurs.
    • getModel

      public static org.apache.jena.rdf.model.Model getModel(String name, org.apache.jena.rdf.model.Model defaultValue)
      Deprecated.
      Returns the value of the environmental variable with the given name as Model or the default value if the variable can not be found or an error occurs.
      Parameters:
      name - name of the environmental variable which should be accessed
      defaultValue - the default value which will be returned if the variable can not be found or if an error occurs.
      Returns:
      the variable value or the default value if an error occurred and a default value is available.
    • getModel

      public static org.apache.jena.rdf.model.Model getModel(String name, Supplier<org.apache.jena.rdf.model.Model> defaultValueFactory)
      Deprecated.
      Returns the value of the environmental variable with the given name as Model or the default value if the variable can not be found or an error occurs.
      Parameters:
      name - name of the environmental variable which should be accessed
      defaultValueFactory - A factory method which can be used to generate a default value which will be returned if the variable can not be found or if an error occurs.
      Returns:
      the variable value or the default value if an error occurred and a default value is available.
    • getModel

      public static org.apache.jena.rdf.model.Model getModel(String name, org.slf4j.Logger logger) throws IllegalStateException
      Deprecated.
      Returns the value of the environmental variable with the given name as Model or throws an IllegalStateException if the variable can not be found or an error occurs.
      Parameters:
      name - name of the environmental variable which should be accessed
      logger - the Logger which will be used to log errors if they occur.
      Returns:
      the variable value
      Throws:
      IllegalStateException - if the variable can not be found or an error occurs.
    • getModel

      public static org.apache.jena.rdf.model.Model getModel(String name, org.apache.jena.rdf.model.Model defaultValue, org.slf4j.Logger logger)
      Deprecated.
      Returns the value of the environmental variable with the given name as Model or the default value if the variable can not be found or an error occurs.
      Parameters:
      name - name of the environmental variable which should be accessed
      defaultValue - the default value which will be returned if the variable can not be found or if an error occurs.
      logger - the Logger which will be used to log errors if they occur.
      Returns:
      the variable value or the default value if an error occurred and a default value is available.
    • getModel

      public static org.apache.jena.rdf.model.Model getModel(String name, Supplier<org.apache.jena.rdf.model.Model> defaultValueFactory, org.slf4j.Logger logger)
      Deprecated.
      Returns the value of the environmental variable with the given name as Model or the default value if the variable can not be found or an error occurs.
      Parameters:
      name - name of the environmental variable which should be accessed
      defaultValueFactory - A factory method which can be used to generate a default value which will be returned if the variable can not be found or if an error occurs.
      logger - the Logger which will be used to log errors if they occur.
      Returns:
      the variable value or the default value if an error occurred and a default value is available.
    • getModelValue

      protected static org.apache.jena.rdf.model.Model getModelValue(String name, org.apache.jena.rdf.model.Model defaultValue, org.slf4j.Logger logger, boolean exceptionWhenFailing, boolean hasDefaultValue) throws IllegalStateException
      Deprecated.
      Internal method defining the default value factory function before calling getModelValue(String, Supplier, Logger, boolean).
      Parameters:
      name - name of the environmental variable which should be accessed
      defaultValue - the default value which will be returned if the variable can not be found or if an error occurs.
      logger - the Logger which will be used to log errors if they occur.
      exceptionWhenFailing - flag indicating whether an exception should be thrown if an error occurs.
      hasDefaultValue - flag indicating whether a default value has been provided.
      Returns:
      the variable value converted to the expected value or the default value if an error occurred and a default value is available.
      Throws:
      IllegalStateException - if exceptionWhenFailing is set to true and one of the following two errors occurs: 1) the variable is not available or 2) the conversion function throws an exception.
    • getModelValue

      protected static org.apache.jena.rdf.model.Model getModelValue(String name, Supplier<org.apache.jena.rdf.model.Model> defaultValueFactory, org.slf4j.Logger logger, boolean exceptionWhenFailing) throws IllegalStateException
      Deprecated.
      Internal method defining the conversion function before calling getVariableValue(String, Function, Supplier, Logger, boolean).
      Parameters:
      name - name of the environmental variable which should be accessed
      defaultValueFactory - A factory method which can be used to generate a default value which will be returned if the variable can not be found or if an error occurs.
      logger - the Logger which will be used to log errors if they occur.
      exceptionWhenFailing - flag indicating whether an exception should be thrown if an error occurs.
      Returns:
      the variable value converted to the expected value or the default value if an error occurred and a default value is available.
      Throws:
      IllegalStateException - if exceptionWhenFailing is set to true and one of the following two errors occurs: 1) the variable is not available or 2) the conversion function throws an exception.
    • getInt

      public static int getInt(String name) throws IllegalStateException
      Deprecated.
      Returns the value of the environmental variable with the given name as int or throws an IllegalStateException if the variable can not be found or an error occurs.
      Parameters:
      name - name of the environmental variable which should be accessed
      Returns:
      the variable value
      Throws:
      IllegalStateException - if the variable can not be found or an error occurs.
    • getInt

      public static int getInt(String name, int defaultValue)
      Deprecated.
      Returns the value of the environmental variable with the given name as int or the default value if the variable can not be found or an error occurs.
      Parameters:
      name - name of the environmental variable which should be accessed
      defaultValue - the default value which will be returned if the variable can not be found or if an error occurs.
      Returns:
      the variable value or the default value if an error occurred and a default value is available.
    • getInt

      public static int getInt(String name, Supplier<Integer> defaultValueFactory)
      Deprecated.
      Returns the value of the environmental variable with the given name as int or the default value if the variable can not be found or an error occurs.
      Parameters:
      name - name of the environmental variable which should be accessed
      defaultValueFactory - A factory method which can be used to generate a default value which will be returned if the variable can not be found or if an error occurs.
      Returns:
      the variable value or the default value if an error occurred and a default value is available.
    • getInt

      public static int getInt(String name, org.slf4j.Logger logger) throws IllegalStateException
      Deprecated.
      Returns the value of the environmental variable with the given name as int or throws an IllegalStateException if the variable can not be found or an error occurs.
      Parameters:
      name - name of the environmental variable which should be accessed
      logger - the Logger which will be used to log errors if they occur.
      Returns:
      the variable value
      Throws:
      IllegalStateException - if the variable can not be found or an error occurs.
    • getInt

      public static int getInt(String name, int defaultValue, org.slf4j.Logger logger)
      Deprecated.
      Returns the value of the environmental variable with the given name as int or the default value if the variable can not be found or an error occurs.
      Parameters:
      name - name of the environmental variable which should be accessed
      defaultValue - the default value which will be returned if the variable can not be found or if an error occurs.
      logger - the Logger which will be used to log errors if they occur.
      Returns:
      the variable value or the default value if an error occurred and a default value is available.
    • getInt

      public static int getInt(String name, Supplier<Integer> defaultValueFactory, org.slf4j.Logger logger)
      Deprecated.
      Returns the value of the environmental variable with the given name as int or the default value if the variable can not be found or an error occurs.
      Parameters:
      name - name of the environmental variable which should be accessed
      defaultValueFactory - A factory method which can be used to generate a default value which will be returned if the variable can not be found or if an error occurs.
      logger - the Logger which will be used to log errors if they occur.
      Returns:
      the variable value or the default value if an error occurred and a default value is available.
    • getIntValue

      protected static int getIntValue(String name, int defaultValue, org.slf4j.Logger logger, boolean exceptionWhenFailing, boolean hasDefaultValue) throws IllegalStateException
      Deprecated.
      Internal method defining the default value factory function before calling getIntValue(String, Supplier, Logger, boolean).
      Parameters:
      name - name of the environmental variable which should be accessed
      defaultValue - the default value which will be returned if the variable can not be found or if an error occurs.
      logger - the Logger which will be used to log errors if they occur.
      exceptionWhenFailing - flag indicating whether an exception should be thrown if an error occurs.
      hasDefaultValue - flag indicating whether a default value has been provided.
      Returns:
      the variable value converted to the expected value or the default value if an error occurred and a default value is available.
      Throws:
      IllegalStateException - if exceptionWhenFailing is set to true and one of the following two errors occurs: 1) the variable is not available or 2) the conversion function throws an exception.
    • getIntValue

      protected static int getIntValue(String name, Supplier<Integer> defaultValueFactory, org.slf4j.Logger logger, boolean exceptionWhenFailing) throws IllegalStateException
      Deprecated.
      Internal method defining the conversion function before calling getVariableValue(String, Function, Supplier, Logger, boolean).
      Parameters:
      name - name of the environmental variable which should be accessed
      defaultValueFactory - A factory method which can be used to generate a default value which will be returned if the variable can not be found or if an error occurs.
      logger - the Logger which will be used to log errors if they occur.
      exceptionWhenFailing - flag indicating whether an exception should be thrown if an error occurs.
      Returns:
      the variable value converted to the expected value or the default value if an error occurred and a default value is available.
      Throws:
      IllegalStateException - if exceptionWhenFailing is set to true and one of the following two errors occurs: 1) the variable is not available or 2) the conversion function throws an exception.
    • getLong

      public static long getLong(String name) throws IllegalStateException
      Deprecated.
      Returns the value of the environmental variable with the given name as long or throws an IllegalStateException if the variable can not be found or an error occurs.
      Parameters:
      name - name of the environmental variable which should be accessed
      Returns:
      the variable value
      Throws:
      IllegalStateException - if the variable can not be found or an error occurs.
    • getLong

      public static long getLong(String name, long defaultValue)
      Deprecated.
      Returns the value of the environmental variable with the given name as long or the default value if the variable can not be found or an error occurs.
      Parameters:
      name - name of the environmental variable which should be accessed
      defaultValue - the default value which will be returned if the variable can not be found or if an error occurs.
      Returns:
      the variable value or the default value if an error occurred and a default value is available.
    • getLong

      public static long getLong(String name, Supplier<Long> defaultValueFactory)
      Deprecated.
      Returns the value of the environmental variable with the given name as long or the default value if the variable can not be found or an error occurs.
      Parameters:
      name - name of the environmental variable which should be accessed
      defaultValueFactory - A factory method which can be used to generate a default value which will be returned if the variable can not be found or if an error occurs.
      Returns:
      the variable value or the default value if an error occurred and a default value is available.
    • getLong

      public static long getLong(String name, org.slf4j.Logger logger) throws IllegalStateException
      Deprecated.
      Returns the value of the environmental variable with the given name as long or throws an IllegalStateException if the variable can not be found or an error occurs.
      Parameters:
      name - name of the environmental variable which should be accessed
      logger - the Logger which will be used to log errors if they occur.
      Returns:
      the variable value
      Throws:
      IllegalStateException - if the variable can not be found or an error occurs.
    • getLong

      public static long getLong(String name, long defaultValue, org.slf4j.Logger logger)
      Deprecated.
      Returns the value of the environmental variable with the given name as long or the default value if the variable can not be found or an error occurs.
      Parameters:
      name - name of the environmental variable which should be accessed
      defaultValue - the default value which will be returned if the variable can not be found or if an error occurs.
      logger - the Logger which will be used to log errors if they occur.
      Returns:
      the variable value or the default value if an error occurred and a default value is available.
    • getLong

      public static long getLong(String name, Supplier<Long> defaultValueFactory, org.slf4j.Logger logger)
      Deprecated.
      Returns the value of the environmental variable with the given name as long or the default value if the variable can not be found or an error occurs.
      Parameters:
      name - name of the environmental variable which should be accessed
      defaultValueFactory - A factory method which can be used to generate a default value which will be returned if the variable can not be found or if an error occurs.
      logger - the Logger which will be used to log errors if they occur.
      Returns:
      the variable value or the default value if an error occurred and a default value is available.
    • getLongValue

      protected static long getLongValue(String name, long defaultValue, org.slf4j.Logger logger, boolean exceptionWhenFailing, boolean hasDefaultValue) throws IllegalStateException
      Deprecated.
      Internal method defining the default value factory function before calling getVariableValue(String, Function, Supplier, Logger, boolean).
      Parameters:
      name - name of the environmental variable which should be accessed
      defaultValue - the default value which will be returned if the variable can not be found or if an error occurs.
      logger - the Logger which will be used to log errors if they occur.
      exceptionWhenFailing - flag indicating whether an exception should be thrown if an error occurs.
      hasDefaultValue - flag indicating whether a default value has been provided.
      Returns:
      the variable value converted to the expected value or the default value if an error occurred and a default value is available.
      Throws:
      IllegalStateException - if exceptionWhenFailing is set to true and one of the following two errors occurs: 1) the variable is not available or 2) the conversion function throws an exception.
    • getLongValue

      protected static long getLongValue(String name, Supplier<Long> defaultValueFactory, org.slf4j.Logger logger, boolean exceptionWhenFailing) throws IllegalStateException
      Deprecated.
      Internal method defining the conversion function before calling getVariableValue(String, Function, Supplier, Logger, boolean).
      Parameters:
      name - name of the environmental variable which should be accessed
      defaultValueFactory - A factory method which can be used to generate a default value which will be returned if the variable can not be found or if an error occurs.
      logger - the Logger which will be used to log errors if they occur.
      exceptionWhenFailing - flag indicating whether an exception should be thrown if an error occurs.
      Returns:
      the variable value converted to the expected value or the default value if an error occurred and a default value is available.
      Throws:
      IllegalStateException - if exceptionWhenFailing is set to true and one of the following two errors occurs: 1) the variable is not available or 2) the conversion function throws an exception.
    • getBoolean

      public static boolean getBoolean(String name) throws IllegalStateException
      Deprecated.
      Returns the value of the environmental variable with the given name as boolean or throws an IllegalStateException if the variable can not be found or an error occurs.
      Parameters:
      name - name of the environmental variable which should be accessed
      Returns:
      the variable value
      Throws:
      IllegalStateException - if the variable can not be found or an error occurs.
    • getBoolean

      public static boolean getBoolean(String name, boolean defaultValue)
      Deprecated.
      Returns the value of the environmental variable with the given name as boolean or the default value if the variable can not be found or an error occurs.
      Parameters:
      name - name of the environmental variable which should be accessed
      defaultValue - the default value which will be returned if the variable can not be found or if an error occurs.
      Returns:
      the variable value or the default value if an error occurred and a default value is available.
    • getBoolean

      public static boolean getBoolean(String name, Supplier<Boolean> defaultValueFactory)
      Deprecated.
      Returns the value of the environmental variable with the given name as boolean or the default value if the variable can not be found or an error occurs.
      Parameters:
      name - name of the environmental variable which should be accessed
      defaultValueFactory - A factory method which can be used to generate a default value which will be returned if the variable can not be found or if an error occurs.
      Returns:
      the variable value or the default value if an error occurred and a default value is available.
    • getBoolean

      public static boolean getBoolean(String name, org.slf4j.Logger logger) throws IllegalStateException
      Deprecated.
      Returns the value of the environmental variable with the given name as boolean or throws an IllegalStateException if the variable can not be found or an error occurs.
      Parameters:
      name - name of the environmental variable which should be accessed
      logger - the Logger which will be used to log errors if they occur.
      Returns:
      the variable value
      Throws:
      IllegalStateException - if the variable can not be found or an error occurs.
    • getBoolean

      public static boolean getBoolean(String name, boolean defaultValue, org.slf4j.Logger logger)
      Deprecated.
      Returns the value of the environmental variable with the given name as boolean or the default value if the variable can not be found or an error occurs.
      Parameters:
      name - name of the environmental variable which should be accessed
      defaultValue - the default value which will be returned if the variable can not be found or if an error occurs.
      logger - the Logger which will be used to log errors if they occur.
      Returns:
      the variable value or the default value if an error occurred and a default value is available.
    • getBoolean

      public static boolean getBoolean(String name, Supplier<Boolean> defaultValueFactory, org.slf4j.Logger logger)
      Deprecated.
      Returns the value of the environmental variable with the given name as boolean or the default value if the variable can not be found or an error occurs.
      Parameters:
      name - name of the environmental variable which should be accessed
      defaultValueFactory - A factory method which can be used to generate a default value which will be returned if the variable can not be found or if an error occurs.
      logger - the Logger which will be used to log errors if they occur.
      Returns:
      the variable value or the default value if an error occurred and a default value is available.
    • getBooleanValue

      protected static boolean getBooleanValue(String name, boolean defaultValue, org.slf4j.Logger logger, boolean exceptionWhenFailing, boolean hasDefaultValue) throws IllegalStateException
      Deprecated.
      Internal method defining the default value factory function before calling getBooleanValue(String, Supplier, Logger, boolean).
      Parameters:
      name - name of the environmental variable which should be accessed
      defaultValue - the default value which will be returned if the variable can not be found or if an error occurs.
      logger - the Logger which will be used to log errors if they occur.
      exceptionWhenFailing - flag indicating whether an exception should be thrown if an error occurs.
      hasDefaultValue - flag indicating whether a default value has been provided.
      Returns:
      the variable value converted to the expected value or the default value if an error occurred and a default value is available.
      Throws:
      IllegalStateException - if exceptionWhenFailing is set to true and one of the following two errors occurs: 1) the variable is not available or 2) the conversion function throws an exception.
    • getBooleanValue

      protected static boolean getBooleanValue(String name, Supplier<Boolean> defaultValueFactory, org.slf4j.Logger logger, boolean exceptionWhenFailing) throws IllegalStateException
      Deprecated.
      Internal method defining the conversion function before calling getVariableValue(String, Function, Supplier, Logger, boolean).
      Parameters:
      name - name of the environmental variable which should be accessed
      defaultValueFactory - A factory method which can be used to generate a default value which will be returned if the variable can not be found or if an error occurs.
      logger - the Logger which will be used to log errors if they occur.
      exceptionWhenFailing - flag indicating whether an exception should be thrown if an error occurs.
      Returns:
      the variable value converted to the expected value or the default value if an error occurred and a default value is available.
      Throws:
      IllegalStateException - if exceptionWhenFailing is set to true and one of the following two errors occurs: 1) the variable is not available or 2) the conversion function throws an exception.