Package org.kie.internal.utils
Class ChainedProperties
java.lang.Object
org.kie.internal.utils.ChainedProperties
- All Implemented Interfaces:
Externalizable,Serializable,Cloneable
Priority
To improve performance in frequent session creation cases, chained properties can be cached by it's conf file name and requesting classloader. To take advantage of the case it must be enabled via system property:
- System properties
- META-INF/ of provided classLoader
To improve performance in frequent session creation cases, chained properties can be cached by it's conf file name and requesting classloader. To take advantage of the case it must be enabled via system property:
org.kie.property.cache.enabled that needs to be set to true
Cache entries are by default limited to 100 to reduce memory consumption but can be fine tuned by system property:org.kie.property.cache.size that needs to be set to valid integer value- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static org.slf4j.Loggerprotected static Map<org.kie.internal.utils.ChainedProperties.CacheKey,List<Properties>> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddProperties(Properties properties) Specifically added properties take priority, so they go to the front of the list.clone()static ChainedPropertiesgetChainedProperties(ClassLoader classLoader) static ChainedPropertiesgetChainedProperties(String confFileName, ClassLoader classLoader) getProperty(String key, String defaultValue) voidmapStartsWith(Map<String, String> map, String startsWith, boolean includeSubProperties) voidvoid
-
Field Details
-
logger
protected static transient org.slf4j.Logger logger -
propertiesCache
protected static Map<org.kie.internal.utils.ChainedProperties.CacheKey,List<Properties>> propertiesCache
-
-
Constructor Details
-
ChainedProperties
public ChainedProperties()
-
-
Method Details
-
getChainedProperties
-
getChainedProperties
-
clone
-
readExternal
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOExceptionClassNotFoundException
-
writeExternal
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
addProperties
Specifically added properties take priority, so they go to the front of the list. -
getProperty
-
mapStartsWith
-