@PublicApi public class DarkFeatures extends Object
Provides access to user-defined "dark" features and fine-tuning parameters.
The idea is to simplify property configuration (for example, have the same configuration on all nodes in cluster environment), so
DarkFeatures
aims to replace System.getProperty(String)
and similar method calls. To provide backward compatibility,
system property values are used if property is not configured.
Many components need these values during initialization phase (for example, to tune cache size). We store "dark" features in Jira's
ApplicationProperties
to ensure that they can be accessed before ActiveObjects or any other plugin component is initialized.
Constructor and Description |
---|
DarkFeatures() |
Modifier and Type | Method and Description |
---|---|
static String |
getApplicationProperty(String propertyName) |
static boolean |
getBoolean(String propertyName) |
static boolean |
getBoolean(String propertyName,
boolean defaultValue) |
static int |
getInteger(String propertyName,
int defaultValue) |
static long |
getLong(String propertyName,
long defaultValue) |
static String |
getProperty(String propertyName) |
static String |
getProperty(String propertyName,
String defaultValue) |
public static long getLong(@NotNull String propertyName, long defaultValue)
public static int getInteger(@NotNull String propertyName, int defaultValue)
public static boolean getBoolean(@NotNull String propertyName)
public static boolean getBoolean(@NotNull String propertyName, boolean defaultValue)
@Contract(value="_, !null -> !null") public static String getProperty(@NotNull String propertyName, @Nullable String defaultValue)
Copyright © 2024 Tempo Software. All Rights Reserved.