Top Description Fields Constructors Methods
com.mchange.v2.cfg

public abstract Class MultiPropertiesConfig

extends Object
implements PropertiesConfig
Class Inheritance
All Implemented Interfaces
com.mchange.v2.cfg.PropertiesConfig
Known Direct Subclasses
com.mchange.v3.hocon.HoconMultiPropertiesConfig, com.mchange.v2.cfg.BasicMultiPropertiesConfig, com.mchange.v2.cfg.CombinedMultiPropertiesConfig
Imports
java.util.List, .Properties

MultiPropertiesConfig allows applications to accept configuration data from a more than one property file (each of which is to be loaded from a unique path using this class' ClassLoader's resource-loading mechanism), and permits access to property data via the resource path from which the properties were loaded, via the prefix of the property (where hierarchical property names are presumed to be '.'-separated), and simply by key. In the by-key and by-prefix indices, when two definitions conflict, the key value pairing specified in the MOST RECENT properties file shadows earlier definitions, and files are loaded in the order of the list of resource paths provided a constructor. The resource path "/" is a special case that always refers to System properties. No actual resource will be loaded. If the mchange-hocon-bridge jar file is available, resource paths specified as "hocon:/path/to/resource" will be parsed as HOCON, whenever values can be interpreted as Strings. The class manages a special instance called "vmConfig" which is accessable via a static method. It's resource path is list specified by a text-file, itself a ClassLoader managed resource, which may be located at /com/mchange/v2/cfg/vmConfigResourcePaths.txt or /mchange-config-resource-paths.txt. This file should be one resource path per line, with blank lines ignored and lines beginning with '#' treated as comments. If no text file of resource paths are available, the following resources are checked: "/mchange-commons.properties", "hocon:/reference,/application,/", "/" See HoconPropertiesConfigSource for information on HOCON identifiers.

Field Summary

Modifier and TypeField and Description
private static String

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static MultiPropertiesConfig
fromProperties(String notionalResourcePath, Properties props)

public static MultiPropertiesConfig
public abstract List<E>
public abstract Properties
getPropertiesByPrefix(String pfx)

Redeclares com.mchange.v2.cfg.PropertiesConfig.getPropertiesByPrefix.

The special prefix "" returns all the Properties

public abstract Properties
public abstract String[]
public abstract String
public static MultiPropertiesConfig
readVmConfig(String[] defaultResources, String[] preemptingResources)
Deprecated Please use the MConfig facade class to acquire configuration

public static MultiPropertiesConfig
readVmConfig()
Deprecated Please use the MConfig facade class to acquire configuration

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

PROGRAMMATICALLY_SUPPLIED_PROPERTIESback to summary
private static String PROGRAMMATICALLY_SUPPLIED_PROPERTIES

Constructor Detail

MultiPropertiesConfigback to summary
public MultiPropertiesConfig()

Method Detail

fromPropertiesback to summary
public static MultiPropertiesConfig fromProperties(String notionalResourcePath, Properties props)
fromPropertiesback to summary
public static MultiPropertiesConfig fromProperties(Properties props)
getDelayedLogItemsback to summary
public abstract List<E> getDelayedLogItems()
getPropertiesByPrefixback to summary
public abstract Properties getPropertiesByPrefix(String pfx)

Redeclares com.mchange.v2.cfg.PropertiesConfig.getPropertiesByPrefix.

The special prefix "" returns all the Properties

getPropertiesByResourcePathback to summary
public abstract Properties getPropertiesByResourcePath(String path)
getPropertiesResourcePathsback to summary
public abstract String[] getPropertiesResourcePaths()
getPropertyback to summary
public abstract String getProperty(String key)

Redeclares com.mchange.v2.cfg.PropertiesConfig.getProperty.

readVmConfigback to summary
public static MultiPropertiesConfig readVmConfig(String[] defaultResources, String[] preemptingResources)

Deprecated

Please use the MConfig facade class to acquire configuration

readVmConfigback to summary
public static MultiPropertiesConfig readVmConfig()

Deprecated

Please use the MConfig facade class to acquire configuration