Solution_
- the solution type, the class with the PlanningSolution
annotationpublic class DroolsScoreDirectorFactory<Solution_> extends AbstractScoreDirectorFactory<Solution_>
ScoreDirectorFactory
.DroolsScoreDirector
,
ScoreDirectorFactory
Modifier and Type | Field and Description |
---|---|
protected org.kie.api.runtime.KieContainer |
kieContainer |
protected String |
ksessionName |
protected Map<org.kie.api.definition.rule.Rule,Function<Solution_,Score<?>>> |
ruleToConstraintWeightExtractorMap |
assertClonedSolution, assertionScoreDirectorFactory, initializingScoreTrend, logger, solutionDescriptor
Modifier | Constructor and Description |
---|---|
protected |
DroolsScoreDirectorFactory(SolutionDescriptor<Solution_> solutionDescriptor,
org.kie.api.KieBase kieBase) |
|
DroolsScoreDirectorFactory(SolutionDescriptor<Solution_> solutionDescriptor,
org.kie.api.runtime.KieContainer kieContainer,
String ksessionName) |
Modifier and Type | Method and Description |
---|---|
DroolsScoreDirector<Solution_> |
buildScoreDirector(boolean lookUpEnabled,
boolean constraintMatchEnabledPreference)
Like
InnerScoreDirectorFactory.buildScoreDirector() , but optionally disables ConstraintMatch tracking and look up
for more performance (presuming the ScoreDirector implementation actually supports it to begin with). |
protected void |
checkIfGlobalScoreHolderExists(org.kie.api.KieBase kieBase) |
protected void |
createRuleToConstraintWeightExtractorMap(org.kie.api.KieBase kieBase) |
org.kie.api.runtime.KieContainer |
getKieContainer() |
String |
getKsessionName() |
Map<org.kie.api.definition.rule.Rule,Function<Solution_,Score<?>>> |
getRuleToConstraintWeightExtractorMap() |
org.kie.api.runtime.KieSession |
newKieSession() |
assertScoreFromScratch, buildScoreDirector, getAssertionScoreDirectorFactory, getInitializingScoreTrend, getScoreDefinition, getSolutionDescriptor, isAssertClonedSolution, setAssertClonedSolution, setAssertionScoreDirectorFactory, setInitializingScoreTrend
protected final org.kie.api.runtime.KieContainer kieContainer
protected final String ksessionName
protected DroolsScoreDirectorFactory(SolutionDescriptor<Solution_> solutionDescriptor, org.kie.api.KieBase kieBase)
solutionDescriptor
- never null
For LegacyDroolsScoreDirectorFactory
only. Do not use.kieBase
- never nullpublic DroolsScoreDirectorFactory(SolutionDescriptor<Solution_> solutionDescriptor, org.kie.api.runtime.KieContainer kieContainer, String ksessionName)
solutionDescriptor
- never nullkieContainer
- never nullksessionName
- null if the default ksession should be usedprotected void checkIfGlobalScoreHolderExists(org.kie.api.KieBase kieBase)
protected void createRuleToConstraintWeightExtractorMap(org.kie.api.KieBase kieBase)
public org.kie.api.runtime.KieContainer getKieContainer()
public String getKsessionName()
public Map<org.kie.api.definition.rule.Rule,Function<Solution_,Score<?>>> getRuleToConstraintWeightExtractorMap()
public DroolsScoreDirector<Solution_> buildScoreDirector(boolean lookUpEnabled, boolean constraintMatchEnabledPreference)
InnerScoreDirectorFactory
InnerScoreDirectorFactory.buildScoreDirector()
, but optionally disables ConstraintMatch
tracking and look up
for more performance (presuming the ScoreDirector
implementation actually supports it to begin with).lookUpEnabled
- true if a ScoreDirector
implementation should track all working objects
for ScoreDirector.lookUpWorkingObject(Object)
constraintMatchEnabledPreference
- false if a ScoreDirector
implementation
should not do ConstraintMatch
tracking even if it supports it.ScoreDirector.isConstraintMatchEnabled()
,
ScoreDirector.getConstraintMatchTotalMap()
public org.kie.api.runtime.KieSession newKieSession()
Copyright © 2006–2020 JBoss by Red Hat. All rights reserved.