KIE Internal 6.2.0.Final

org.kie.internal.utils
Class ChainedProperties

java.lang.Object
  extended by org.kie.internal.utils.ChainedProperties
All Implemented Interfaces:
Externalizable, Serializable

public class ChainedProperties
extends Object
implements Externalizable

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:
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:
Serialized Form

Field Summary
protected static org.slf4j.Logger logger
           
protected static Map<org.kie.internal.utils.ChainedProperties.CacheKey,List<URL>> resourceUrlCache
           
 
Constructor Summary
ChainedProperties()
           
ChainedProperties(String confFileName, ClassLoader classLoader)
           
ChainedProperties(String confFileName, ClassLoader classLoader, boolean populateDefaults)
           
 
Method Summary
 void addProperties(Properties properties)
          Specifically added properties take priority, so they go to the front of the list.
 String getProperty(String key, String defaultValue)
           
 void mapStartsWith(Map<String,String> map, String startsWith, boolean includeSubProperties)
           
 void readExternal(ObjectInput in)
           
 void writeExternal(ObjectOutput out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected static transient org.slf4j.Logger logger

resourceUrlCache

protected static Map<org.kie.internal.utils.ChainedProperties.CacheKey,List<URL>> resourceUrlCache
Constructor Detail

ChainedProperties

public ChainedProperties()

ChainedProperties

public ChainedProperties(String confFileName,
                         ClassLoader classLoader)

ChainedProperties

public ChainedProperties(String confFileName,
                         ClassLoader classLoader,
                         boolean populateDefaults)
Method Detail

readExternal

public void readExternal(ObjectInput in)
                  throws IOException,
                         ClassNotFoundException
Specified by:
readExternal in interface Externalizable
Throws:
IOException
ClassNotFoundException

writeExternal

public void writeExternal(ObjectOutput out)
                   throws IOException
Specified by:
writeExternal in interface Externalizable
Throws:
IOException

addProperties

public void addProperties(Properties properties)
Specifically added properties take priority, so they go to the front of the list.

Parameters:
properties -

getProperty

public String getProperty(String key,
                          String defaultValue)

mapStartsWith

public void mapStartsWith(Map<String,String> map,
                          String startsWith,
                          boolean includeSubProperties)

KIE Internal 6.2.0.Final

Copyright © 2001-2015 JBoss by Red Hat. All Rights Reserved.