public class ConfigurationComponent
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
APP_VERSION |
static java.lang.String |
AUDIT_KEY_PREFIX |
static java.lang.String |
BUILD_NUMBER |
static int |
DEFAULT_APP_PORT |
static java.lang.String |
DEFAULT_SEARCH_LOGS_COLLECTION_SUFFIX |
static java.lang.String |
defaultCollectionPrefix |
static java.lang.String |
GIT_COMMIT |
static java.lang.String |
historyKeyPrefix |
static java.lang.String |
JOB_HISTORY_COLLECTION_PREFIX |
static java.lang.String |
LOG_KEY_PREFIX |
static java.lang.String |
METRICS_INDEXING_ENABLED |
static java.lang.String |
metricsKeyPrefix |
static java.lang.String |
QUICKSTART_ENABLED |
static java.lang.String |
searchLogsClusterNameKeyPrefix |
static java.lang.String |
SOLR_BUFFER_CONCURRENCY |
static java.lang.String |
SOLR_BUFFER_FLUSH_INTERVAL |
static java.lang.String |
SOLR_BUFFER_SIZE |
static java.lang.String |
SOLR_COMMIT_WITHIN |
static java.lang.String |
SOLR_ZK_CLIENT_TIMEOUT |
static java.lang.String |
SOLR_ZK_CONNECT |
static java.lang.String |
SOLR_ZK_CONNECT_TIMEOUT |
int |
solrBufferConcurrency |
int |
solrBufferFlushInterval |
int |
solrBufferSize |
int |
solrCommitWithin |
int |
solrZKClientTimeout |
java.lang.String |
solrZkConnect |
int |
solrZkConnectTimeout |
static java.lang.String |
USAGE_MONITOR |
static java.lang.String |
USAGE_MONITOR_TEST_MODE |
Constructor and Description |
---|
ConfigurationComponent(ZooKeeperConfigurationComponent zkFactory,
MetricRegistry metricRegistry)
Note that this takes in a ZookeeperConfigurationComponent even though it doesn't use it directly.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getAppHome() |
java.io.File |
getAppHomeDirectory() |
java.lang.String |
getAppHostname() |
int |
getAppPort() |
java.lang.String |
getAppVersion() |
java.lang.String |
getBindAddress() |
boolean |
getBoolean(java.lang.String key,
boolean defaultValue)
Get the value of the property with the given key, or defaultValue if not set.
|
java.lang.String |
getBuildNumber() |
java.util.Map<java.lang.String,java.lang.String> |
getComponentVersions() |
AggregatedConfiguration |
getConfiguration()
Return the whole configuration.
|
com.lucidworks.apollo.common.models.SearchCluster |
getDefaultSearchCluster() |
double |
getDouble(java.lang.String key,
double defaultValue)
Get the value of the property with the given key, or defaultValue if not set.
|
float |
getFloat(java.lang.String key,
float defaultValue)
Get the value of the property with the given key, or defaultValue if not set.
|
java.lang.String |
getGitCommit() |
int |
getInt(java.lang.String key,
int defaultValue)
Get the value of the property with the given key, or defaultValue if not set.
|
long |
getLong(java.lang.String key,
long defaultValue)
Get the value of the property with the given key, or defaultValue if not set.
|
static <T> T |
getPropertyFromConfigurations(java.lang.String key,
T defValue,
org.apache.commons.configuration.Configuration... configs)
Returns the value of specified key in the first configuration in which it is found and non-null.
|
java.lang.String |
getSearchLogDocIdFieldName(java.lang.String collection) |
java.lang.Integer |
getSearchLogDocIdLimit(java.lang.String collection) |
java.lang.String |
getSearchLogsClusterName(java.lang.String collectionId) |
java.lang.String |
getSearchLogsCollectionName(java.lang.String collection) |
java.lang.String |
getSolrSignalAggrCollection(java.lang.String collection)
Return the name of the aggregated signals collection.
|
java.lang.String |
getSolrSignalCollection(java.lang.String collection)
Return the name of the raw signals collection.
|
java.lang.String |
getString(java.lang.String key,
java.lang.String defaultValue)
Get the value of the property with the given key, or defaultValue if not set.
|
boolean |
hasSsl() |
void |
init(DefaultSearchClusterRegistrar.DefaultSearchCluster defaultSearchCluster) |
boolean |
isQuickstartEnabled() |
boolean |
metricsIndexingEnabled() |
void |
setCallback(java.lang.String key,
ConfigurationListener listener)
ConfigurationListener will be called when the given configuration key is modified on any node.
|
void |
setOverrideProperty(java.lang.String key,
java.lang.Object value) |
java.util.List<java.lang.String> |
split(java.lang.String value)
Uses the splitter returned by
getSplitter() to split the given value into a list. |
boolean |
usageMonitorEnabled() |
boolean |
usageMonitorTestMode() |
public static final int DEFAULT_APP_PORT
public static final java.lang.String APP_VERSION
public static final java.lang.String GIT_COMMIT
public static final java.lang.String BUILD_NUMBER
public static final java.lang.String SOLR_ZK_CONNECT
public java.lang.String solrZkConnect
public static final java.lang.String SOLR_ZK_CLIENT_TIMEOUT
public int solrZKClientTimeout
public static final java.lang.String SOLR_ZK_CONNECT_TIMEOUT
public int solrZkConnectTimeout
public static final java.lang.String SOLR_BUFFER_SIZE
public int solrBufferSize
public static final java.lang.String SOLR_BUFFER_FLUSH_INTERVAL
public int solrBufferFlushInterval
public static final java.lang.String SOLR_COMMIT_WITHIN
public int solrCommitWithin
public static final java.lang.String SOLR_BUFFER_CONCURRENCY
public int solrBufferConcurrency
public static final java.lang.String DEFAULT_SEARCH_LOGS_COLLECTION_SUFFIX
public static final java.lang.String searchLogsClusterNameKeyPrefix
public static final java.lang.String LOG_KEY_PREFIX
public static final java.lang.String defaultCollectionPrefix
public static final java.lang.String JOB_HISTORY_COLLECTION_PREFIX
public static final java.lang.String AUDIT_KEY_PREFIX
public static final java.lang.String USAGE_MONITOR
public static final java.lang.String USAGE_MONITOR_TEST_MODE
public static final java.lang.String metricsKeyPrefix
public static final java.lang.String historyKeyPrefix
public static final java.lang.String METRICS_INDEXING_ENABLED
public static final java.lang.String QUICKSTART_ENABLED
public ConfigurationComponent(ZooKeeperConfigurationComponent zkFactory, MetricRegistry metricRegistry)
public java.lang.String getSearchLogsCollectionName(java.lang.String collection)
public java.lang.String getSearchLogsClusterName(java.lang.String collectionId)
public boolean usageMonitorEnabled()
public boolean usageMonitorTestMode()
public boolean metricsIndexingEnabled()
public boolean isQuickstartEnabled()
public java.lang.String getAppVersion()
public java.util.Map<java.lang.String,java.lang.String> getComponentVersions()
public java.lang.String getGitCommit()
public java.lang.String getBuildNumber()
public java.lang.String getAppHostname()
public java.lang.String getBindAddress()
public int getAppPort()
public boolean hasSsl()
public java.lang.String getAppHome()
public java.io.File getAppHomeDirectory()
public java.lang.String getSolrSignalCollection(java.lang.String collection)
public java.lang.String getSolrSignalAggrCollection(java.lang.String collection)
@WhenReady public void init(DefaultSearchClusterRegistrar.DefaultSearchCluster defaultSearchCluster)
public com.lucidworks.apollo.common.models.SearchCluster getDefaultSearchCluster()
public java.lang.String getSearchLogDocIdFieldName(java.lang.String collection)
public java.lang.Integer getSearchLogDocIdLimit(java.lang.String collection)
public java.lang.String getString(java.lang.String key, java.lang.String defaultValue)
key
- cannot be nulldefaultValue
- default value if key is not set; can be null.public int getInt(java.lang.String key, int defaultValue)
key
- cannot be nulldefaultValue
- default value if key is not set; can be null.public long getLong(java.lang.String key, long defaultValue)
key
- cannot be nulldefaultValue
- default value if key is not set; can be null.public float getFloat(java.lang.String key, float defaultValue)
key
- cannot be nulldefaultValue
- default value if key is not set; can be null.public double getDouble(java.lang.String key, double defaultValue)
key
- cannot be nulldefaultValue
- default value if key is not set; can be null.public boolean getBoolean(java.lang.String key, boolean defaultValue)
key
- cannot be nulldefaultValue
- default value if key is not set; can be null.public void setOverrideProperty(java.lang.String key, java.lang.Object value)
public void setCallback(java.lang.String key, ConfigurationListener listener)
key
- listener
- public AggregatedConfiguration getConfiguration()
public java.util.List<java.lang.String> split(java.lang.String value)
getSplitter()
to split the given value into a list. Handles nulls.value
- public static <T> T getPropertyFromConfigurations(java.lang.String key, T defValue, org.apache.commons.configuration.Configuration... configs)