public class ClientConfiguration
extends org.apache.commons.configuration.CompositeConfiguration
Modifier and Type | Class and Description |
---|---|
static class |
ClientConfiguration.ClientProperty |
Modifier and Type | Field and Description |
---|---|
static String |
GLOBAL_CONF_FILENAME |
static String |
USER_ACCUMULO_DIR_NAME |
static String |
USER_CONF_FILENAME |
Constructor and Description |
---|
ClientConfiguration(org.apache.commons.configuration.Configuration... configs)
Iterates through the Configuration objects, populating this object.
|
ClientConfiguration(List<? extends org.apache.commons.configuration.Configuration> configs) |
Modifier and Type | Method and Description |
---|---|
static ClientConfiguration |
deserialize(String serializedConfig) |
String |
get(ClientConfiguration.ClientProperty prop)
Returns the value for prop, the default value if not present.
|
static ClientConfiguration |
loadDefault()
Attempts to load a configuration file from the system.
|
String |
serialize() |
void |
setProperty(ClientConfiguration.ClientProperty prop,
String value)
Sets the value of property to value
|
ClientConfiguration |
with(ClientConfiguration.ClientProperty prop,
String value)
Same as
setProperty(ClientProperty, String) but returns the ClientConfiguration for chaining purposes |
ClientConfiguration |
withInstance(String instanceName)
Same as
with(ClientProperty, String) for ClientProperty.INSTANCE_NAME |
ClientConfiguration |
withInstance(UUID instanceId)
Same as
with(ClientProperty, String) for ClientProperty.INSTANCE_ID |
ClientConfiguration |
withKeystore(String path)
Same as
withKeystore(String, String, String) with password null and type null |
ClientConfiguration |
withKeystore(String path,
String password,
String type)
Same as
with(ClientProperty, String) for ClientProperty.INSTANCE_RPC_SSL_CLIENT_AUTH, ClientProperty.RPC_SSL_KEYSTORE_PATH,
ClientProperty.RPC_SSL_KEYSTORE_PASSWORD, and ClientProperty.RPC_SSL_KEYSTORE_TYPE |
ClientConfiguration |
withSsl(boolean sslEnabled)
Same as
withSsl(boolean, boolean) with useJsseConfig set to false |
ClientConfiguration |
withSsl(boolean sslEnabled,
boolean useJsseConfig)
Same as
with(ClientProperty, String) for ClientProperty.INSTANCE_RPC_SSL_ENABLED and ClientProperty.RPC_USE_JSSE |
ClientConfiguration |
withTruststore(String path)
Same as
withTruststore(String) with password null and type null |
ClientConfiguration |
withTruststore(String path,
String password,
String type)
Same as
with(ClientProperty, String) for ClientProperty.RPC_SSL_TRUSTORE_PATH, ClientProperty.RPC_SSL_TRUSTORE_PASSWORD, and
ClientProperty.RPC_SSL_TRUSTORE_TYPE |
ClientConfiguration |
withZkHosts(String zooKeepers)
Same as
with(ClientProperty, String) for ClientProperty.INSTANCE_ZK_HOST |
ClientConfiguration |
withZkTimeout(int timeout)
Same as
with(ClientProperty, String) for ClientProperty.INSTANCE_ZK_TIMEOUT |
addConfiguration, addPropertyDirect, clear, clearPropertyDirect, clone, containsKey, getConfiguration, getInMemoryConfiguration, getKeys, getKeys, getList, getNumberOfConfigurations, getProperty, getSource, getStringArray, isEmpty, removeConfiguration, setDelimiterParsingDisabled, setListDelimiter
addErrorLogListener, addProperty, append, clearProperty, copy, createInterpolator, getBigDecimal, getBigDecimal, getBigInteger, getBigInteger, getBoolean, getBoolean, getBoolean, getByte, getByte, getByte, getDefaultListDelimiter, getDelimiter, getDouble, getDouble, getDouble, getFloat, getFloat, getFloat, getInt, getInt, getInteger, getInterpolator, getList, getListDelimiter, getLogger, getLong, getLong, getLong, getProperties, getProperties, getShort, getShort, getShort, getString, getString, getSubstitutor, interpolate, interpolate, interpolatedConfiguration, interpolateHelper, isDelimiterParsingDisabled, isThrowExceptionOnMissing, resolveContainerStore, setDefaultListDelimiter, setDelimiter, setLogger, setProperty, setThrowExceptionOnMissing, subset
addConfigurationListener, addErrorListener, clearConfigurationListeners, clearErrorListeners, createErrorEvent, createEvent, fireError, fireEvent, getConfigurationListeners, getErrorListeners, isDetailEvents, removeConfigurationListener, removeErrorListener, setDetailEvents
public static final String USER_ACCUMULO_DIR_NAME
public static final String USER_CONF_FILENAME
public static final String GLOBAL_CONF_FILENAME
public ClientConfiguration(List<? extends org.apache.commons.configuration.Configuration> configs)
public ClientConfiguration(org.apache.commons.configuration.Configuration... configs)
PropertiesConfiguration
,
loadDefault()
public static ClientConfiguration loadDefault()
PropertiesConfiguration
,
File.pathSeparator
public static ClientConfiguration deserialize(String serializedConfig)
public String serialize()
public String get(ClientConfiguration.ClientProperty prop)
public void setProperty(ClientConfiguration.ClientProperty prop, String value)
public ClientConfiguration with(ClientConfiguration.ClientProperty prop, String value)
setProperty(ClientProperty, String)
but returns the ClientConfiguration for chaining purposespublic ClientConfiguration withInstance(String instanceName)
with(ClientProperty, String)
for ClientProperty.INSTANCE_NAMEpublic ClientConfiguration withInstance(UUID instanceId)
with(ClientProperty, String)
for ClientProperty.INSTANCE_IDpublic ClientConfiguration withZkHosts(String zooKeepers)
with(ClientProperty, String)
for ClientProperty.INSTANCE_ZK_HOSTpublic ClientConfiguration withZkTimeout(int timeout)
with(ClientProperty, String)
for ClientProperty.INSTANCE_ZK_TIMEOUTpublic ClientConfiguration withSsl(boolean sslEnabled)
withSsl(boolean, boolean)
with useJsseConfig set to falsepublic ClientConfiguration withSsl(boolean sslEnabled, boolean useJsseConfig)
with(ClientProperty, String)
for ClientProperty.INSTANCE_RPC_SSL_ENABLED and ClientProperty.RPC_USE_JSSEpublic ClientConfiguration withTruststore(String path)
withTruststore(String)
with password null and type nullpublic ClientConfiguration withTruststore(String path, String password, String type)
with(ClientProperty, String)
for ClientProperty.RPC_SSL_TRUSTORE_PATH, ClientProperty.RPC_SSL_TRUSTORE_PASSWORD, and
ClientProperty.RPC_SSL_TRUSTORE_TYPEpublic ClientConfiguration withKeystore(String path)
withKeystore(String, String, String)
with password null and type nullpublic ClientConfiguration withKeystore(String path, String password, String type)
with(ClientProperty, String)
for ClientProperty.INSTANCE_RPC_SSL_CLIENT_AUTH, ClientProperty.RPC_SSL_KEYSTORE_PATH,
ClientProperty.RPC_SSL_KEYSTORE_PASSWORD, and ClientProperty.RPC_SSL_KEYSTORE_TYPECopyright © 2011–2016 The Apache Software Foundation. All rights reserved.