|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.bigdata.config.Configuration
public class Configuration
Base class for managing the initial configuration metadata for indices and locatable resources.
We can not report properties that DO NOT correspond to any known property within the umbrella bigdata namespace (as log4j does) because we do not make a closed world assumption for properties in that namespace.
We can not interpret properties given in a Java code style (as jini does with its Configuration object).
We are not using the Java beans model so you can not describe property values or instantiate objects using reflection. Instead, the logic for that stuff shows up in the code for the class that is being configured.
This presumes a fixed syntactic relation between a resource/index and
its container rather than the explicit relation defined by
RelationSchema.CONTAINER.
| Field Summary | |
|---|---|
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 Summary | |
|---|---|
Configuration()
|
|
| Method Summary | ||
|---|---|---|
static String |
getOverrideProperty(String namespace,
String property)
Return the name that can be used to overrride 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
|
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. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final transient org.apache.log4j.Logger log
public static final transient String NAMESPACE
public static final transient char DOT
| Constructor Detail |
|---|
public Configuration()
| Method Detail |
|---|
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 overriden using any of
the other methods.BTrees 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 overriden 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 overriden 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.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||