Package org.evrete

Class KnowledgeService.Builder

java.lang.Object
org.evrete.KnowledgeService.Builder
Enclosing class:
KnowledgeService

public static class KnowledgeService.Builder extends Object
The Builder class is responsible for constructing instances of the KnowledgeService class.
  • 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

      public KnowledgeService.Builder withExecutor(ExecutorService executor)
      Sets the external ExecutorService for this builder. Please note that externally supplied executors won't be automatically shut down when the ExecutorService.shutdown() method is invoked
      Parameters:
      executor - The ExecutorService to set.
      Returns:
      The current Builder instance for method chaining.
    • build

      public KnowledgeService build()
      Constructs a new instance of the KnowledgeService with the current configuration of the builder.
      Returns:
      A new instance of the KnowledgeService.