java.lang.Object
org.evrete.KnowledgeService.Builder
- Enclosing class:
- KnowledgeService
The Builder class is responsible for constructing instances of the KnowledgeService class.
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Constructs a new instance of theKnowledgeServicewith the current configuration of the builder.withExecutor(ExecutorService executor) Sets the externalExecutorServicefor this builder.withMemoryFactoryProvider(Class<? extends MemoryFactoryProvider> memoryFactoryProvider) Sets the MemoryFactoryProvider class for this builder.withSourceCompilerProvider(Class<? extends SourceCompilerProvider> sourceCompilerProvider) Sets the SourceCompilerProvider class for this builder.withTypeResolverProvider(Class<? extends TypeResolverProvider> typeResolverProvider) Sets the TypeResolverProvider class for this builder.
-
Method Details
-
withMemoryFactoryProvider
public KnowledgeService.Builder withMemoryFactoryProvider(Class<? extends MemoryFactoryProvider> memoryFactoryProvider) Sets the MemoryFactoryProvider class for this builder.- Parameters:
memoryFactoryProvider- The MemoryFactoryProvider class to set.- Returns:
- The current Builder instance for method chaining.
-
withTypeResolverProvider
public KnowledgeService.Builder withTypeResolverProvider(Class<? extends TypeResolverProvider> typeResolverProvider) Sets the TypeResolverProvider class for this builder.- Parameters:
typeResolverProvider- The TypeResolverProvider class to set.- Returns:
- The current Builder instance for method chaining.
-
withSourceCompilerProvider
public KnowledgeService.Builder withSourceCompilerProvider(Class<? extends SourceCompilerProvider> sourceCompilerProvider) Sets the SourceCompilerProvider class for this builder.- Parameters:
sourceCompilerProvider- The SourceCompilerProvider class to set.- Returns:
- The current Builder instance for method chaining.
-
withExecutor
Sets the externalExecutorServicefor this builder. Please note that externally supplied executors won't be automatically shut down when theExecutorService.shutdown()method is invoked- Parameters:
executor- The ExecutorService to set.- Returns:
- The current Builder instance for method chaining.
-
build
Constructs a new instance of theKnowledgeServicewith the current configuration of the builder.- Returns:
- A new instance of the KnowledgeService.
-