Package org.kie.internal.utils
Class ChainedProperties
- java.lang.Object
-
- org.kie.internal.utils.ChainedProperties
-
- All Implemented Interfaces:
Externalizable
,Serializable
,Cloneable
public class ChainedProperties extends Object implements Externalizable, Cloneable
Priority- 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 totrue
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:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected static org.slf4j.Logger
logger
-
Constructor Summary
Constructors Constructor Description ChainedProperties()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addProperties(Properties properties)
Specifically added properties take priority, so they go to the front of the list.ChainedProperties
clone()
void
filterDroolsPropertiesForSerialization()
static ChainedProperties
getChainedProperties(ClassLoader classLoader)
static ChainedProperties
getChainedProperties(String confFileName, ClassLoader classLoader)
String
getProperty(String key, String defaultValue)
void
mapStartsWith(Map<String,String> map, String startsWith, boolean includeSubProperties)
void
readExternal(ObjectInput in)
void
writeExternal(ObjectOutput out)
-
-
-
Method Detail
-
getChainedProperties
public static ChainedProperties getChainedProperties(ClassLoader classLoader)
-
getChainedProperties
public static ChainedProperties getChainedProperties(String confFileName, ClassLoader classLoader)
-
clone
public ChainedProperties clone()
-
filterDroolsPropertiesForSerialization
public void filterDroolsPropertiesForSerialization()
-
readExternal
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
- Specified by:
readExternal
in interfaceExternalizable
- Throws:
IOException
ClassNotFoundException
-
writeExternal
public void writeExternal(ObjectOutput out) throws IOException
- Specified by:
writeExternal
in interfaceExternalizable
- Throws:
IOException
-
addProperties
public void addProperties(Properties properties)
Specifically added properties take priority, so they go to the front of the list.
-
-