com.neeve.config
Class ConfigConfig
java.lang.Object
com.neeve.root.RootConfig
com.neeve.config.ConfigConfig
public abstract class ConfigConfig
- extends RootConfig
Class containing configuration information for the CONFIG package and all
CONFIG implementation packages.
This class contains configuration information for all classes in the CONFIG
package and the CONFIG implementation packages. The user sets/gets configuration
information for the CONFIG and the CONFIG implementation packages using
PACKAGE_NAME
as the package key for the configuration setter/getter
methods in RootConfig
.
When a class belonging to the CONFIG or an CONFIG implementation package is
instantiated, it fetches the configuration information to use from this
class that, in turn, fetches it from RootConfig
. In the interest of
performance, this class caches the package wide config information the first
time it fetches it from RootConfig
. The drawback is that any config
change to this package made after the first class in this package is
instantiated is not propagated to newly instantiated classes. The user can
flush the cached config object using flushConfig()
. This will force
this class to fetch a new copy of the package wide config info when the next
class is instantiated.
- Threading:
- This class is safe for concurrent access by multiple threads
Field Summary |
static String |
PACKAGE_NAME
The name of this package to use with config setter/getter methods. |
PACKAGE_NAME
public static final String PACKAGE_NAME
- The name of this package to use with config setter/getter methods.
- See Also:
- Constant Field Values
ConfigConfig
public ConfigConfig()
getConfig
public static RootConfig.ObjectConfig getConfig()
- Get the package configuration object.
- Returns:
- Returns the package configuration object
- Threading:
- This method is safe for concurrent access by multiple threads
flushConfig
public static void flushConfig()
- Flush the cached package configuration object.
This method discards any cached package configuration information.
- Threading:
- This method is safe for concurrent access by multiple threads
Copyright © 2016 Neeve Research, LLC. All Rights Reserved.