Class ProjectMultiThreadCollectingOperation.Builder

java.lang.Object
com.e1c.langtool.collector.ProjectMultiThreadCollectingOperation.Builder
Enclosing class:
ProjectMultiThreadCollectingOperation

public static final class ProjectMultiThreadCollectingOperation.Builder extends Object
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • newBuilder

      New builder to configure operation.
      It is mandatory to call project(IProject) to setup current project and build() to finish configuration. It is recommended to call collectingService(IFeatureValueCollectingService) and parameters(ICollectingParameters) for basic settings.
      Returns:
      the builder, cannot return null.
    • build

      Builds new operation with set parameters.
      Returns:
      the project multi thread collecting operation, cannot return null.
    • collectingService

      Set collecting service that will use for multi-thread access.
      Parameters:
      collectingService - the collecting service, cannot be null.
      Returns:
      the builder, cannot return null.
    • beforeOperationTaskName

      public ProjectMultiThreadCollectingOperation.Builder beforeOperationTaskName(String beforeOperationTaskName)
      Task name of the operation that starts on project scanning resource and collect files that need to process. Default value is: "Collecting strings from: <ProjectName>"
      Parameters:
      beforeOperationTaskName - the before operation task name, cannot be null.
      Returns:
      the builder, cannot return null.
    • beforeOperationRun

      public ProjectMultiThreadCollectingOperation.Builder beforeOperationRun(Runnable beforeOperationRun)
      Operation may run some call before multi-thread collecting.
      Parameters:
      beforeOperationRun - the before operation run, cannot be null.
      Returns:
      the builder, cannot return null.
    • operationTaskName

      public ProjectMultiThreadCollectingOperation.Builder operationTaskName(String operationTaskName)
      Customize Operation main task name. Default value is: "Collecting strings from: <ProjectName>"
      Parameters:
      operationTaskName - the operation task name, cannot be null.
      Returns:
      the builder, cannot return null.
    • threadKeepAliveTime

      public ProjectMultiThreadCollectingOperation.Builder threadKeepAliveTime(Duration threadKeepAliveTime)
      Customize Thread-pool behavior that keeps thread alive some time after task queue is empty. Default value is: 10 seconds.
      Parameters:
      threadKeepAliveTime - the thread keep alive time, cannot be null.
      Returns:
      the builder, cannot return null.
    • threadNamePrefix

      public ProjectMultiThreadCollectingOperation.Builder threadNamePrefix(String threadNamePrefix)
      Thread name prefix of multi-thread access pool after which will append the number of the thread in pool. Default value is: "Project-string-collector-(ProjectName)-"
      Parameters:
      threadNamePrefix - the thread name prefix, cannot be null.
      Returns:
      the builder, cannot return null.
    • subTaskName

      Sub task name function where fist calling parameter is current processed number of files, and the second is total number of files submitted in pool queue. Default value is: format message for "files {0} of {1}".
      Parameters:
      subTaskName - the sub task name, cannot be null.
      Returns:
      the builder, cannot return null.
    • parameters

      The collecting parameters.
      Parameters:
      parameters - the parameters, cannot be null.
      Returns:
      the builder, cannot return null.
    • project

      public ProjectMultiThreadCollectingOperation.Builder project(org.eclipse.core.resources.IProject project)
      Project to collect files from.
      Parameters:
      project - the project, cannot be null.
      Returns:
      the builder, cannot return null.