Package org.kie.internal.utils
Class ChainedProperties
- java.lang.Object
-
- org.kie.internal.utils.ChainedProperties
-
- All Implemented Interfaces:
java.io.Externalizable,java.io.Serializable,java.lang.Cloneable
public class ChainedProperties extends java.lang.Object implements java.io.Externalizable, java.lang.CloneablePriority- 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.enabledthat needs to be set totrueCache entries are by default limited to 100 to reduce memory consumption but can be fine tuned by system property:
org.kie.property.cache.sizethat needs to be set to valid integer value- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected static org.slf4j.Loggerlogger
-
Constructor Summary
Constructors Constructor Description ChainedProperties()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ChainedPropertiesaddProperties(java.util.Properties properties)Specifically added properties take priority, so they go to the front of the list.ChainedPropertiesclone()voidfilterDroolsPropertiesForSerialization()static ChainedPropertiesgetChainedProperties(java.lang.ClassLoader classLoader)static ChainedPropertiesgetChainedProperties(java.lang.String confFileName, java.lang.ClassLoader classLoader)java.lang.StringgetProperty(java.lang.String key, java.lang.String defaultValue)voidmapStartsWith(java.util.Map<java.lang.String,java.lang.String> map, java.lang.String startsWith, boolean includeSubProperties)voidreadExternal(java.io.ObjectInput in)voidwriteExternal(java.io.ObjectOutput out)
-
-
-
Method Detail
-
getChainedProperties
public static ChainedProperties getChainedProperties(java.lang.ClassLoader classLoader)
-
getChainedProperties
public static ChainedProperties getChainedProperties(java.lang.String confFileName, java.lang.ClassLoader classLoader)
-
clone
public ChainedProperties clone()
- Overrides:
clonein classjava.lang.Object
-
filterDroolsPropertiesForSerialization
public void filterDroolsPropertiesForSerialization()
-
readExternal
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException- Specified by:
readExternalin interfacejava.io.Externalizable- Throws:
java.io.IOExceptionjava.lang.ClassNotFoundException
-
writeExternal
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException- Specified by:
writeExternalin interfacejava.io.Externalizable- Throws:
java.io.IOException
-
addProperties
public ChainedProperties addProperties(java.util.Properties properties)
Specifically added properties take priority, so they go to the front of the list.
-
getProperty
public java.lang.String getProperty(java.lang.String key, java.lang.String defaultValue)
-
mapStartsWith
public void mapStartsWith(java.util.Map<java.lang.String,java.lang.String> map, java.lang.String startsWith, boolean includeSubProperties)
-
-