Class ConnectorExecutorImpl

java.lang.Object
org.bonitasoft.engine.connector.impl.ConnectorExecutorImpl
All Implemented Interfaces:
LifecycleService, TenantLifecycleService, ConnectorExecutor

public class ConnectorExecutorImpl extends Object implements ConnectorExecutor
Execute connectors directly
Author:
Baptiste Mesta, Celine Souchet, Matthieu Chaffotte
  • Field Details

  • Constructor Details

    • ConnectorExecutorImpl

      public ConnectorExecutorImpl(int queueCapacity, int corePoolSize, int maximumPoolSize, long keepAliveTimeSeconds, SessionAccessor sessionAccessor, SessionService sessionService, TimeTracker timeTracker, io.micrometer.core.instrument.MeterRegistry meterRegistry, long tenantId, ExecutorServiceMetricsProvider executorServiceMetricsProvider)
      The handling of threads relies on the JVM The rules to create new thread are: - If the number of threads is less than the corePoolSize, create a new Thread to run a new task. - If the number of threads is equal (or greater than) the corePoolSize, put the task into the queue. - If the queue is full, and the number of threads is less than the maxPoolSize, create a new thread to run tasks in. - If the queue is full, and the number of threads is greater than or equal to maxPoolSize, reject the task.
      Parameters:
      queueCapacity - The maximum number of execution of connector to queue for each thread
      corePoolSize - the number of threads to keep in the pool, even if they are idle, unless allowCoreThreadTimeOut is set
      maximumPoolSize - the maximum number of threads to allow in the pool
      keepAliveTimeSeconds - when the number of threads is greater than the core, this is the maximum time that excess idle threads will wait for new tasks before terminating. (in seconds)
  • Method Details