Class PartitionedSearchPhaseConfig
- java.lang.Object
- 
- org.optaplanner.core.config.AbstractConfig<Config_>
- 
- org.optaplanner.core.config.phase.PhaseConfig<PartitionedSearchPhaseConfig>
- 
- org.optaplanner.core.config.partitionedsearch.PartitionedSearchPhaseConfig
 
 
 
- 
 public class PartitionedSearchPhaseConfig extends PhaseConfig<PartitionedSearchPhaseConfig> 
- 
- 
Field SummaryFields Modifier and Type Field Description static StringACTIVE_THREAD_COUNT_AUTOstatic StringACTIVE_THREAD_COUNT_UNLIMITEDprotected List<PhaseConfig>phaseConfigListprotected StringrunnablePartThreadLimitprotected Class<? extends SolutionPartitioner<?>>solutionPartitionerClassprotected Map<String,String>solutionPartitionerCustomPropertiesstatic StringXML_ELEMENT_NAME
 - 
Constructor SummaryConstructors Constructor Description PartitionedSearchPhaseConfig()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description PartitionedSearchPhaseConfigcopyConfig()Typically implemented by constructing a new instance and callingAbstractConfig.inherit(AbstractConfig)on itList<PhaseConfig>getPhaseConfigList()StringgetRunnablePartThreadLimit()Class<? extends SolutionPartitioner<?>>getSolutionPartitionerClass()Map<String,String>getSolutionPartitionerCustomProperties()PartitionedSearchPhaseConfiginherit(PartitionedSearchPhaseConfig inheritedConfig)Inherits each property of theinheritedConfigunless that property (or a semantic alternative) is defined by this instance (which overwrites the inherited behaviour).voidsetPhaseConfigList(List<PhaseConfig> phaseConfigList)voidsetRunnablePartThreadLimit(String runnablePartThreadLimit)voidsetSolutionPartitionerClass(Class<? extends SolutionPartitioner<?>> solutionPartitionerClass)voidsetSolutionPartitionerCustomProperties(Map<String,String> solutionPartitionerCustomProperties)voidvisitReferencedClasses(Consumer<Class<?>> classVisitor)Call the class visitor on each (possibly null) Class instance provided to this config by the user (including those provided in child configs).- 
Methods inherited from class org.optaplanner.core.config.phase.PhaseConfiggetTerminationConfig, setTerminationConfig, toString
 
- 
 
- 
- 
- 
Field Detail- 
XML_ELEMENT_NAMEpublic static final String XML_ELEMENT_NAME - See Also:
- Constant Field Values
 
 - 
ACTIVE_THREAD_COUNT_AUTOpublic static final String ACTIVE_THREAD_COUNT_AUTO - See Also:
- Constant Field Values
 
 - 
ACTIVE_THREAD_COUNT_UNLIMITEDpublic static final String ACTIVE_THREAD_COUNT_UNLIMITED - See Also:
- Constant Field Values
 
 - 
solutionPartitionerClassprotected Class<? extends SolutionPartitioner<?>> solutionPartitionerClass 
 - 
solutionPartitionerCustomPropertiesprotected Map<String,String> solutionPartitionerCustomProperties 
 - 
runnablePartThreadLimitprotected String runnablePartThreadLimit 
 - 
phaseConfigListprotected List<PhaseConfig> phaseConfigList 
 
- 
 - 
Method Detail- 
getSolutionPartitionerClasspublic Class<? extends SolutionPartitioner<?>> getSolutionPartitionerClass() 
 - 
setSolutionPartitionerClasspublic void setSolutionPartitionerClass(Class<? extends SolutionPartitioner<?>> solutionPartitionerClass) 
 - 
getSolutionPartitionerCustomPropertiespublic Map<String,String> getSolutionPartitionerCustomProperties() 
 - 
setSolutionPartitionerCustomPropertiespublic void setSolutionPartitionerCustomProperties(Map<String,String> solutionPartitionerCustomProperties) 
 - 
getRunnablePartThreadLimitpublic String getRunnablePartThreadLimit() Similar to a thread pool size, but instead of limiting the number ofThreads, it limits the number ofrunnableThreads to avoid consuming all CPU resources (which would starve UI, Servlets and REST threads). The number ofThreads is always equal to the number of partitions returned bySolutionPartitioner.splitWorkingSolution(ScoreDirector, Integer), because otherwise some partitions would never run (especially withasynchronous termination). If this limit (orRuntime.availableProcessors()) is lower than the number of partitions, this results in a slower score calculation speed per partitionSolver. Defaults to "AUTO" which consumes the majority but not all of the CPU cores on multi-core machines, to prevent a livelock that hangs other processes (such as your IDE, REST servlets threads or SSH connections) on the machine. Use "UNLIMITED" to give it all CPU cores. This is useful if you're handling the CPU consumption on an OS level.- Returns:
- null, a number, "AUTO" or "UNLIMITED".
 
 - 
setRunnablePartThreadLimitpublic void setRunnablePartThreadLimit(String runnablePartThreadLimit) 
 - 
getPhaseConfigListpublic List<PhaseConfig> getPhaseConfigList() 
 - 
setPhaseConfigListpublic void setPhaseConfigList(List<PhaseConfig> phaseConfigList) 
 - 
inheritpublic PartitionedSearchPhaseConfig inherit(PartitionedSearchPhaseConfig inheritedConfig) Description copied from class:AbstractConfigInherits each property of theinheritedConfigunless that property (or a semantic alternative) is defined by this instance (which overwrites the inherited behaviour).After the inheritance, if a property on this AbstractConfigcomposition is replaced, it should not affect the inherited composition instance.- Overrides:
- inheritin class- PhaseConfig<PartitionedSearchPhaseConfig>
- Parameters:
- inheritedConfig- never null
- Returns:
- this
 
 - 
copyConfigpublic PartitionedSearchPhaseConfig copyConfig() Description copied from class:AbstractConfigTypically implemented by constructing a new instance and callingAbstractConfig.inherit(AbstractConfig)on it- Specified by:
- copyConfigin class- AbstractConfig<PartitionedSearchPhaseConfig>
- Returns:
- new instance
 
 - 
visitReferencedClassespublic void visitReferencedClasses(Consumer<Class<?>> classVisitor) Description copied from class:AbstractConfigCall the class visitor on each (possibly null) Class instance provided to this config by the user (including those provided in child configs). Required to create the bean factory in Quarkus.- Specified by:
- visitReferencedClassesin class- AbstractConfig<PartitionedSearchPhaseConfig>
- Parameters:
- classVisitor- The visitor of classes, never null. Can accept null instances of Class
 
 
- 
 
-