Package org.apache.drill.exec.util
Class SystemPropertyUtil
java.lang.Object
org.apache.drill.exec.util.SystemPropertyUtil
A collection of utility methods to retrieve and parse the values of Java system properties.
This is a modified version of Netty's internal system property utility class.
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleanReturnstrueif and only if the system property with the specifiedkeyexists.static StringReturns the value of the Java system property with the specifiedkey, while falling back tonullif the property access fails.static StringReturns the value of the Java system property with the specifiedkey, while falling back to the specified default value if the property access fails.static booleangetBoolean(String key, boolean def) Returns the value of the Java system property with the specifiedkey, while falling back to the specified default value if the property access fails.static intReturns the value of the Java system property with the specifiedkey, while falling back to the specified default value if the property access fails.static longReturns the value of the Java system property with the specifiedkey, while falling back to the specified default value if the property access fails.
-
Method Details
-
contains
Returnstrueif and only if the system property with the specifiedkeyexists. -
get
Returns the value of the Java system property with the specifiedkey, while falling back tonullif the property access fails.- Returns:
- the property value or
null
-
get
Returns the value of the Java system property with the specifiedkey, while falling back to the specified default value if the property access fails.- Returns:
- the property value.
defif there's no such property or if an access to the specified property is not allowed.
-
getBoolean
Returns the value of the Java system property with the specifiedkey, while falling back to the specified default value if the property access fails.- Returns:
- the property value.
defif there's no such property or if an access to the specified property is not allowed.
-
getInt
Returns the value of the Java system property with the specifiedkey, while falling back to the specified default value if the property access fails.- Returns:
- the property value.
defif there's no such property or if an access to the specified property is not allowed.
-
getLong
Returns the value of the Java system property with the specifiedkey, while falling back to the specified default value if the property access fails.- Returns:
- the property value.
defif there's no such property or if an access to the specified property is not allowed.
-