Solution_
- the solution type, the class with the PlanningSolution
annotationpublic class AbstractSolverFactory<Solution_> extends SolverFactory<Solution_>
Modifier and Type | Field and Description |
---|---|
protected SolverConfig |
solverConfig |
protected SolverConfigContext |
solverConfigContext |
Constructor and Description |
---|
AbstractSolverFactory(SolverConfigContext solverConfigContext) |
Modifier and Type | Method and Description |
---|---|
Solver<Solution_> |
buildSolver()
Creates a new
Solver instance. |
SolverFactory<Solution_> |
cloneSolverFactory()
Build a
SolverFactory quickly (without parsing XML) that builds the exact same Solver
with SolverFactory.buildSolver() , but can also be modified with SolverFactory.getSolverConfig() to build a different
Solver without affecting the original SolverFactory . |
SolverConfig |
getSolverConfig()
Allows you to programmatically change the
SolverConfig at runtime before building the Solver . |
SolverConfigContext |
getSolverConfigContext() |
createEmpty, createEmpty, createEmptyFromKieContainer, createEmptyFromKieContainer, createFromKieContainerXmlResource, createFromKieContainerXmlResource, createFromKieContainerXmlResource, createFromXmlFile, createFromXmlFile, createFromXmlInputStream, createFromXmlInputStream, createFromXmlReader, createFromXmlReader, createFromXmlResource, createFromXmlResource
protected final SolverConfigContext solverConfigContext
protected SolverConfig solverConfig
public AbstractSolverFactory(SolverConfigContext solverConfigContext)
public SolverConfigContext getSolverConfigContext()
public SolverConfig getSolverConfig()
SolverFactory
SolverConfig
at runtime before building the Solver
.
This method is not thread-safe. To configure a SolverConfig
differently for parallel requests,
build a template SolverFactory
from XML
and clone it SolverFactory.cloneSolverFactory()
for each request, before before calling this method.
getSolverConfig
in class SolverFactory<Solution_>
public Solver<Solution_> buildSolver()
SolverFactory
Solver
instance.buildSolver
in class SolverFactory<Solution_>
public SolverFactory<Solution_> cloneSolverFactory()
SolverFactory
SolverFactory
quickly (without parsing XML) that builds the exact same Solver
with SolverFactory.buildSolver()
, but can also be modified with SolverFactory.getSolverConfig()
to build a different
Solver
without affecting the original SolverFactory
.cloneSolverFactory
in class SolverFactory<Solution_>
SolverFactory
subclass implementation than this instanceCopyright © 2006–2019 JBoss by Red Hat. All rights reserved.