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 boolean
Returnstrue
if and only if the system property with the specifiedkey
exists.static String
Returns the value of the Java system property with the specifiedkey
, while falling back tonull
if the property access fails.static String
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 boolean
getBoolean
(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 int
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 long
Returns 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
Returnstrue
if and only if the system property with the specifiedkey
exists. -
get
Returns the value of the Java system property with the specifiedkey
, while falling back tonull
if 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.
def
if 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.
def
if 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.
def
if 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.
def
if there's no such property or if an access to the specified property is not allowed.
-