Package org.drools.core
Class RuleBaseConfiguration
java.lang.Object
org.drools.core.BaseConfiguration<KieBaseOption,SingleValueKieBaseOption,MultiValueKieBaseOption>
org.drools.core.RuleBaseConfiguration
- All Implemented Interfaces:
Externalizable,Serializable,KieBaseOptionsConfiguration,OptionsConfiguration<KieBaseOption,,SingleValueKieBaseOption, MultiValueKieBaseOption> KieBaseConfiguration,PropertiesConfiguration,InternalPropertiesConfiguration
public class RuleBaseConfiguration
extends BaseConfiguration<KieBaseOption,SingleValueKieBaseOption,MultiValueKieBaseOption>
implements KieBaseConfiguration, Externalizable
Available configuration options:
drools.maintainTms = <true|false> drools.sequential = <true|false> drools.sequential.agenda = <sequential|dynamic> drools.removeIdentities = <true|false> drools.shareAlphaNodes = <true|false> drools.shareBetaNodes = <true|false> drools.alphaNodeHashingThreshold = <1...n> drools.alphaNodeRangeIndexThreshold = <1...n> drools.betaNodeRangeIndexEnabled = <true|false> drools.sessionPool = <1...n> drools.compositeKeyDepth = <1..3> drools.indexLeftBetaMemory = <true/false> drools.indexRightBetaMemory = <true/false> drools.equalityBehavior = <identity|equality> drools.conflictResolver = <qualified class name> drools.consequenceExceptionHandler = <qualified class name> drools.ruleBaseUpdateHandler = <qualified class name> drools.sessionClock = <qualified class name> drools.mbeans = <enabled|disabled> drools.classLoaderCacheEnabled = <true|false> drools.declarativeAgendaEnabled = <true|false> drools.permgenThreshold = <1...n> drools.jittingThreshold = <1...n>
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic class -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final booleanstatic final booleanstatic final Stringstatic final ConfigurationKey<RuleBaseConfiguration>protected static final org.slf4j.LoggerFields inherited from class org.drools.core.BaseConfiguration
compConfig -
Constructor Summary
ConstructorsConstructorDescriptionRuleBaseConfiguration(CompositeConfiguration<KieBaseOption, SingleValueKieBaseOption, MultiValueKieBaseOption> compConfig) A constructor that sets the classloader to be used as the parent classloader of this rule base classloaders, and the properties to be used as base configuration options -
Method Summary
Modifier and TypeMethodDescriptionvoidaddActivationListener(String name, ActivationListenerFactory factory) voidintintintgetInternalProperty(String name) intintReturns the configured number of maximum threads to use for concurrent propagation when multi-thread evaluation is enabled.<T extends SingleValueKieBaseOption>
TintbooleanbooleanbooleanbooleanbooleanbooleanReturns true if the partitioning of the rulebase is enabled and false otherwise.booleanbooleanbooleanbooleanbooleanvoidvoidsetAlphaNodeHashingThreshold(int alphaNodeHashingThreshold) voidsetAlphaNodeRangeIndexThreshold(int alphaNodeRangeIndexThreshold) voidsetAssertBehaviour(RuleBaseConfiguration.AssertBehaviour assertBehaviour) voidsetBetaNodeRangeIndexEnabled(boolean betaNodeRangeIndexEnabled) voidsetCompositeKeyDepth(int compositeKeyDepth) voidsetConsequenceExceptionHandler(String consequenceExceptionHandler) voidsetDeclarativeAgendaEnabled(boolean enabled) Enable declarative agendavoidvoidsetIndexLeftBetaMemory(boolean indexLeftBetaMemory) voidsetIndexPrecedenceOption(IndexPrecedenceOption precedence) voidsetIndexRightBetaMemory(boolean indexRightBetaMemory) booleansetInternalProperty(String name, String value) voidsetJittingThreshold(int jittingThreshold) voidsetMaintainTms(boolean maintainTms) voidsetMaxThreads(int maxThreads) If multi-thread evaluation is enabled, this parameter configures the maximum number of threads each session can use for concurrent Rete propagation.voidsetOption(KieBaseOption option) voidsetParallelExecution(ParallelExecutionOption parallelExecutionOption) voidsetPrototypesOption(PrototypesOption prototypesOption) voidsetRemoveIdentities(boolean removeIdentities) voidsetRuleBaseUpdateHandler(String ruleBaseUpdateHandler) voidsetSequential(boolean sequential) voidsetSequentialAgenda(RuleBaseConfiguration.SequentialAgenda sequentialAgenda) voidsetSessionPoolSize(int sessionPoolSize) voidsetShareAlphaNodes(boolean shareAlphaNodes) voidsetShareBetaNodes(boolean shareBetaNodes) voidMethods inherited from class org.drools.core.BaseConfiguration
as, checkCanChange, getChainedProperties, getClassLoader, getProperties, getProperty, getPropertyValue, isImmutable, makeImmutable, setClassLoader, setPropertyMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.kie.api.conf.OptionsConfiguration
as, getClassLoader, getOption, getOptionKeys, getOptionSubKeys, makeImmutableMethods inherited from interface org.kie.api.PropertiesConfiguration
getProperty, setProperty
-
Field Details
-
KEY
-
DEFAULT_PHREAK
public static final boolean DEFAULT_PHREAK- See Also:
-
DEFAULT_SESSION_CACHE
public static final boolean DEFAULT_SESSION_CACHE- See Also:
-
DEFAULT_SIGN_ON_SERIALIZATION
- See Also:
-
logger
protected static final transient org.slf4j.Logger logger
-
-
Constructor Details
-
RuleBaseConfiguration
public RuleBaseConfiguration(CompositeConfiguration<KieBaseOption, SingleValueKieBaseOption, MultiValueKieBaseOption> compConfig) A constructor that sets the classloader to be used as the parent classloader of this rule base classloaders, and the properties to be used as base configuration options
-
-
Method Details
-
writeExternal
- Specified by:
writeExternalin interfaceExternalizable- Overrides:
writeExternalin classBaseConfiguration<KieBaseOption,SingleValueKieBaseOption, MultiValueKieBaseOption> - Throws:
IOException
-
readExternal
- Specified by:
readExternalin interfaceExternalizable- Overrides:
readExternalin classBaseConfiguration<KieBaseOption,SingleValueKieBaseOption, MultiValueKieBaseOption> - Throws:
IOExceptionClassNotFoundException
-
getOption
- Specified by:
getOptionin interfaceOptionsConfiguration<KieBaseOption,SingleValueKieBaseOption, MultiValueKieBaseOption>
-
setOption
- Specified by:
setOptionin interfaceOptionsConfiguration<KieBaseOption,SingleValueKieBaseOption, MultiValueKieBaseOption>
-
setInternalProperty
- Specified by:
setInternalPropertyin interfaceInternalPropertiesConfiguration
-
getInternalProperty
- Specified by:
getInternalPropertyin interfaceInternalPropertiesConfiguration
-
setSequential
public void setSequential(boolean sequential) -
isSequential
public boolean isSequential() -
isMaintainTms
public boolean isMaintainTms() -
setMaintainTms
public void setMaintainTms(boolean maintainTms) -
isRemoveIdentities
public boolean isRemoveIdentities() -
setRemoveIdentities
public void setRemoveIdentities(boolean removeIdentities) -
getJittingThreshold
public int getJittingThreshold() -
setJittingThreshold
public void setJittingThreshold(int jittingThreshold) -
getAlphaNodeHashingThreshold
public int getAlphaNodeHashingThreshold() -
setAlphaNodeHashingThreshold
public void setAlphaNodeHashingThreshold(int alphaNodeHashingThreshold) -
getAlphaNodeRangeIndexThreshold
public int getAlphaNodeRangeIndexThreshold() -
setAlphaNodeRangeIndexThreshold
public void setAlphaNodeRangeIndexThreshold(int alphaNodeRangeIndexThreshold) -
isBetaNodeRangeIndexEnabled
public boolean isBetaNodeRangeIndexEnabled() -
setBetaNodeRangeIndexEnabled
public void setBetaNodeRangeIndexEnabled(boolean betaNodeRangeIndexEnabled) -
getSessionPoolSize
public int getSessionPoolSize() -
setSessionPoolSize
public void setSessionPoolSize(int sessionPoolSize) -
getAssertBehaviour
-
setAssertBehaviour
-
getEventProcessingMode
-
setEventProcessingMode
-
getPrototypesOption
-
setPrototypesOption
-
getCompositeKeyDepth
public int getCompositeKeyDepth() -
setCompositeKeyDepth
public void setCompositeKeyDepth(int compositeKeyDepth) -
isIndexLeftBetaMemory
public boolean isIndexLeftBetaMemory() -
setIndexLeftBetaMemory
public void setIndexLeftBetaMemory(boolean indexLeftBetaMemory) -
isIndexRightBetaMemory
public boolean isIndexRightBetaMemory() -
setIndexRightBetaMemory
public void setIndexRightBetaMemory(boolean indexRightBetaMemory) -
getIndexPrecedenceOption
-
setIndexPrecedenceOption
-
getConsequenceExceptionHandler
-
setConsequenceExceptionHandler
-
getRuleBaseUpdateHandler
-
setRuleBaseUpdateHandler
-
getSequentialAgenda
-
setSequentialAgenda
-
setParallelExecution
-
enforceSingleThreadEvaluation
public void enforceSingleThreadEvaluation() -
isParallelEvaluation
public boolean isParallelEvaluation()Returns true if the partitioning of the rulebase is enabled and false otherwise. Default is false.- Returns:
-
isParallelExecution
public boolean isParallelExecution() -
setMaxThreads
public void setMaxThreads(int maxThreads) If multi-thread evaluation is enabled, this parameter configures the maximum number of threads each session can use for concurrent Rete propagation.- Parameters:
maxThreads- the maximum number of threads to use. If 0 or a negative number is set, the engine will use number of threads equal to the number of partitions in the rule base. Default number of threads is 0.
-
getMaxThreads
public int getMaxThreads()Returns the configured number of maximum threads to use for concurrent propagation when multi-thread evaluation is enabled. Default is zero.- Returns:
-
isDeclarativeAgenda
public boolean isDeclarativeAgenda() -
setDeclarativeAgendaEnabled
public void setDeclarativeAgendaEnabled(boolean enabled) Enable declarative agenda- Parameters:
enabled-
-
addActivationListener
-
getActivationListenerFactory
-