public class Configuration extends Object
Modifier and Type | Field and Description |
---|---|
static char |
DOT
The namespace separator character.
|
protected static org.apache.log4j.Logger |
log
Property values are logged at INFO.
|
static String |
NAMESPACE
The prefix for namespace specific property value overrides.
|
Constructor and Description |
---|
Configuration() |
Modifier and Type | Method and Description |
---|---|
static String |
getOverrideProperty(String namespace,
String property)
Return the name that can be used to override the specified property for
the given namespace.
|
static String |
getProperty(IIndexManager indexManagerIsIgnored,
Properties properties,
String namespace,
String propertyName,
String defaultValue)
Return the value for property, which may be the default value, a global
override, or a namespace override.
|
static <E> E |
getProperty(IIndexManager indexManager,
Properties properties,
String namespace,
String globalName,
String defaultValue,
IValidator<E> validator)
Variant converts to the specified generic type and validates the value.
|
static NV |
getProperty2(IIndexManager indexManagerIsIgnored,
Properties properties,
String namespace,
String globalName,
String defaultValue)
Variant returns both the name under which the value was discovered and
the value.
|
protected static UUID |
resolveDataService(IIndexManager indexManager,
String val)
Resolve the value to a
DataService UUID . |
protected static final transient org.apache.log4j.Logger log
public static final transient String NAMESPACE
public static final transient char DOT
public static String getProperty(IIndexManager indexManagerIsIgnored, Properties properties, String namespace, String propertyName, String defaultValue)
Options
interfaces. The specific default is supplied by
the caller and will be used if the value is not overridden using any of
the other methods.BTree
s by specifying a value for
IndexMetadata.Options#BTREE_BRANCHING_FACTOR
. In general, the
name of the property is declared by an interface along with its default
value. DOT
). For example,
you can override the branching factor property for an index named
foo.myIndex
by specifying a value for the property name
com.bigdata.namespace.foo.myIndex.com.bigdata.btree.BTree.branchingFactor
("com.bigdata.namespace"
is the NAMESPACE
prefix for overrides, foo.myIndex
is the name of the index, and
is the name of the
property that will be overridden for that index). Alternatively you can
override the branching factor for all indices in the "foo" relation by
specifying a value for the property name
com.bigdata.namespace.foo.com.bigdata.btree.BTree.branchingFactor
.
Note: You can use getOverrideProperty(String, String)
to form
these property names automatically, including from within a Jini
configuration file.indexManagerIsIgnored
- The value specified to the ctor (optional).properties
- The properties object against which the value of the property
will be resolved.namespace
- The namespace of the index, relation, etc (optional).propertyName
- The bare name of the property whose default value is requested
(without the namespace).defaultValue
- The value for that property that will be returned if the
default has not been overridden as described above (optional).public static NV getProperty2(IIndexManager indexManagerIsIgnored, Properties properties, String namespace, String globalName, String defaultValue)
indexManagerIsIgnored
- properties
- namespace
- globalName
- defaultValue
- public static <E> E getProperty(IIndexManager indexManager, Properties properties, String namespace, String globalName, String defaultValue, IValidator<E> validator) throws ConfigurationException
E
- indexManager
- properties
- namespace
- globalName
- defaultValue
- validator
- null
if there was no
default.ConfigurationException
protected static UUID resolveDataService(IIndexManager indexManager, String val)
DataService
UUID
.indexManager
- The index manager (optional).val
- The value is either a UUID
or a service name.UUID
of the identified service -or- null
if no service is identified for that value or if the
indexManager is either not given or not an
IBigdataFederation
.IllegalArgumentException
- if the val is null
.public static String getOverrideProperty(String namespace, String property)
namespace
- The namespace (of an index, relation, etc).property
- The global property name.Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.