Class ConnectorExecutorImpl

    • Field Detail

      • NUMBER_OF_CONNECTORS_PENDING

        public static final java.lang.String NUMBER_OF_CONNECTORS_PENDING
        See Also:
        Constant Field Values
      • NUMBER_OF_CONNECTORS_RUNNING

        public static final java.lang.String NUMBER_OF_CONNECTORS_RUNNING
        See Also:
        Constant Field Values
      • NUMBER_OF_CONNECTORS_EXECUTED

        public static final java.lang.String NUMBER_OF_CONNECTORS_EXECUTED
        See Also:
        Constant Field Values
    • Constructor Detail

      • 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)