org.apache.ignite.internal.processors.pool

## Class PoolProcessor

- java.lang.Object
- - org.apache.ignite.internal.processors.GridProcessorAdapter
  - - org.apache.ignite.internal.processors.pool.PoolProcessor

All Implemented Interfaces:
  GridComponent, GridProcessor

    public class PoolProcessor
    extends GridProcessorAdapter

Processor which abstracts out thread pool management.

### Nested Class Summary

### Nested classes/interfaces inherited from interface org.apache.ignite.internal.GridComponent

`GridComponent.DiscoveryDataExchangeType`

### Field Summary

Fields
`static String` `ACTIVE_COUNT_DESC`
`static String` `COMPLETED_TASK_DESC`
`static String` `CORE_SIZE_DESC`
`static String` `IS_SHUTDOWN_DESC`
`static String` `IS_TERMINATED_DESC`
`static String` `IS_TERMINATING_DESC`
`static String` `KEEP_ALIVE_TIME_DESC`
`static String` `LARGEST_SIZE_DESC`
`static String` `MAX_SIZE_DESC`
`static String` `POOL_SIZE_DESC`
`static String` `QUEUE_SIZE_DESC`
`static String` `REJ_HND_DESC`
`static String` `STREAM_POOL_QUEUE_VIEW` Name of the system view for a data streamer `StripedExecutor` queue view.
`static String` `STREAM_POOL_QUEUE_VIEW_DESC` Description of the system view for a data streamer `StripedExecutor` queue view.
`static String` `SYS_POOL_QUEUE_VIEW` Name of the system view for a system `StripedExecutor` queue view.
`static String` `SYS_POOL_QUEUE_VIEW_DESC` Description of the system view for a system `StripedExecutor` queue view.
`static String` `TASK_COUNT_DESC`
`static String` `TASK_EXEC_TIME` Task execution time metric name.
`static String` `TASK_EXEC_TIME_DESC` Task execution time metric description.
`static long[]` `TASK_EXEC_TIME_HISTOGRAM_BUCKETS` Histogram buckets for the task execution time metric (in milliseconds).
`static String` `THRD_FACTORY_DESC`
`static String` `THREAD_POOLS` Group for a thread pools.

### Fields inherited from class org.apache.ignite.internal.processors.GridProcessorAdapter

`ctx, diagnosticLog, log`

### Constructor Summary

Constructors
Constructor and Description
`PoolProcessor(GridKernalContext ctx)` Constructor.

### Method Summary

All Methods Instance Methods Concrete Methods
`IgniteStripedThreadPoolExecutor` `asyncCallbackPool()` Gets async callback pool.
`ExecutorService` `buildIndexExecutorService()` Return Thread pool for create/rebuild indexes.
`@Nullable Executor` `customExecutor(String name)` Gets executor service for custom policy by executor name.
`@Nullable Map<String,? extends ExecutorService>` `customExecutors()` Executor services that is in charge of processing user compute task.
`ExecutorService` `getAffinityExecutorService()` Get affinity executor service.
`StripedExecutor` `getDataStreamerExecutorService()` Executor service that is in charge of processing data stream messages.
`ExecutorService` `getExecutorService()`
`@Nullable ExecutorService` `getIndexingExecutorService()` Get indexing executor service.
`ExecutorService` `getManagementExecutorService()` Executor service that is in charge of processing internal and Visor `GridJobs`.
`ExecutorService` `getPeerClassLoadingExecutorService()`
`ExecutorService` `getQueryExecutorService()` Executor service that is in charge of processing query messages.
`ExecutorService` `getRebalanceExecutorService()` Executor service that is in charge of processing rebalance messages.
`ExecutorService` `getReencryptionExecutorService()`
`ExecutorService` `getRestExecutorService()` Should return an instance of fully configured thread pool to be used for processing of client messages (REST requests).
`ExecutorService` `getSchemaExecutorService()` Executor service that is in charge of processing schema change messages.
`ExecutorService` `getServiceExecutorService()` Executor service that is in charge of processing service proxy invocations.
`ExecutorService` `getSnapshotExecutorService()`
`StripedExecutor` `getStripedExecutorService()` Executor service that is in charge of processing internal system messages in stripes (dedicated threads).
`IgniteStripedThreadPoolExecutor` `getStripedRebalanceExecutorService()` Executor service that is in charge of processing unorderable rebalance messages.
`ExecutorService` `getSystemExecutorService()` Executor service that is in charge of processing internal system messages.
`ExecutorService` `getThinClientExecutorService()` Executor service for thin clients.
`Executor` `poolForPolicy(byte plc)` Get executor service for policy.
`void` `registerMetrics()` Registers thread pools metrics and system views.
`void` `start()` Starts grid component.
`void` `stop(boolean cancel)` Stops grid component.
`ExecutorService` `utilityCachePool()` Gets utility cache pool.

### Methods inherited from class org.apache.ignite.internal.processors.GridProcessorAdapter

`assertParameter, collectGridNodeData, collectJoiningNodeData, discoveryDataType, onDisconnected, onGridDataReceived, onJoiningNodeDataReceived, onKernalStart, onKernalStop, onReconnected, printMemoryStats, toString, validateNode, validateNode`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Field Detail

#### ACTIVE_COUNT_DESC

    public static final String ACTIVE_COUNT_DESC

See Also:
  Constant Field Values

#### COMPLETED_TASK_DESC

    public static final String COMPLETED_TASK_DESC

See Also:
  Constant Field Values

#### CORE_SIZE_DESC

    public static final String CORE_SIZE_DESC

See Also:
  Constant Field Values

#### LARGEST_SIZE_DESC

    public static final String LARGEST_SIZE_DESC

See Also:
  Constant Field Values

#### MAX_SIZE_DESC

    public static final String MAX_SIZE_DESC

See Also:
  Constant Field Values

#### POOL_SIZE_DESC

    public static final String POOL_SIZE_DESC

See Also:
  Constant Field Values

#### TASK_COUNT_DESC

    public static final String TASK_COUNT_DESC

See Also:
  Constant Field Values

#### QUEUE_SIZE_DESC

    public static final String QUEUE_SIZE_DESC

See Also:
  Constant Field Values

#### KEEP_ALIVE_TIME_DESC

    public static final String KEEP_ALIVE_TIME_DESC

See Also:
  Constant Field Values

#### IS_SHUTDOWN_DESC

    public static final String IS_SHUTDOWN_DESC

See Also:
  Constant Field Values

#### IS_TERMINATED_DESC

    public static final String IS_TERMINATED_DESC

See Also:
  Constant Field Values

#### IS_TERMINATING_DESC

    public static final String IS_TERMINATING_DESC

See Also:
  Constant Field Values

#### REJ_HND_DESC

    public static final String REJ_HND_DESC

See Also:
  Constant Field Values

#### THRD_FACTORY_DESC

    public static final String THRD_FACTORY_DESC

See Also:
  Constant Field Values

#### TASK_EXEC_TIME

    public static final String TASK_EXEC_TIME

Task execution time metric name.

See Also:
  Constant Field Values

#### TASK_EXEC_TIME_DESC

    public static final String TASK_EXEC_TIME_DESC

Task execution time metric description.

See Also:
  Constant Field Values

#### STREAM_POOL_QUEUE_VIEW

    public static final String STREAM_POOL_QUEUE_VIEW

Name of the system view for a data streamer `StripedExecutor` queue view.

#### STREAM_POOL_QUEUE_VIEW_DESC

    public static final String STREAM_POOL_QUEUE_VIEW_DESC

Description of the system view for a data streamer `StripedExecutor` queue view.

See Also:
  Constant Field Values

#### SYS_POOL_QUEUE_VIEW

    public static final String SYS_POOL_QUEUE_VIEW

Name of the system view for a system `StripedExecutor` queue view.

#### SYS_POOL_QUEUE_VIEW_DESC

    public static final String SYS_POOL_QUEUE_VIEW_DESC

Description of the system view for a system `StripedExecutor` queue view.

See Also:
  Constant Field Values

#### THREAD_POOLS

    public static final String THREAD_POOLS

Group for a thread pools.

See Also:
  Constant Field Values

#### TASK_EXEC_TIME_HISTOGRAM_BUCKETS

    public static final long[] TASK_EXEC_TIME_HISTOGRAM_BUCKETS

Histogram buckets for the task execution time metric (in milliseconds).

### Constructor Detail

#### PoolProcessor

    public PoolProcessor(GridKernalContext ctx)

Constructor.

Parameters:
  `ctx` - Kernal context.

### Method Detail

#### start

    public void start()
               throws IgniteCheckedException

Starts grid component.

Specified by:
  `start` in interface `GridComponent`
Overrides:
  `start` in class `GridProcessorAdapter`
Throws:
  `IgniteCheckedException` - Throws in case of any errors.

#### stop

    public void stop(boolean cancel)
              throws IgniteCheckedException

Stops grid component.

Specified by:
  `stop` in interface `GridComponent`
Overrides:
  `stop` in class `GridProcessorAdapter`
Parameters:
  `cancel` - If `true`, then all ongoing tasks or jobs for relevant components need to be cancelled.
Throws:
  `IgniteCheckedException` - Thrown in case of any errors.

#### registerMetrics

    public void registerMetrics()

Registers thread pools metrics and system views.

#### poolForPolicy

    public Executor poolForPolicy(byte plc)
                           throws IgniteCheckedException

Get executor service for policy.

Parameters:
  `plc` - Policy.
Returns:
  Executor service.
Throws:
  `IgniteCheckedException` - If failed.

#### customExecutor

    @Nullable
    public @Nullable Executor customExecutor(String name)

Gets executor service for custom policy by executor name.

Parameters:
  `name` - Executor name.
Returns:
  Executor service.

#### utilityCachePool

    public ExecutorService utilityCachePool()

Gets utility cache pool.

Returns:
  Utility cache pool.

#### asyncCallbackPool

    public IgniteStripedThreadPoolExecutor asyncCallbackPool()

Gets async callback pool.

Returns:
  Async callback pool.

#### getExecutorService

    public ExecutorService getExecutorService()

Returns:
  Thread pool implementation to be used in grid to process job execution requests and user messages sent to the node.

#### getServiceExecutorService

    public ExecutorService getServiceExecutorService()

Executor service that is in charge of processing service proxy invocations.

Returns:
  Thread pool implementation to be used in grid for service proxy invocations.

#### getSystemExecutorService

    public ExecutorService getSystemExecutorService()

Executor service that is in charge of processing internal system messages.

Returns:
  Thread pool implementation to be used in grid for internal system messages.

#### getStripedExecutorService

    public StripedExecutor getStripedExecutorService()

Executor service that is in charge of processing internal system messages in stripes (dedicated threads).

Returns:
  Thread pool implementation to be used in grid for internal system messages.

#### getManagementExecutorService

    public ExecutorService getManagementExecutorService()

Executor service that is in charge of processing internal and Visor `GridJobs`.

Returns:
  Thread pool implementation to be used in grid for internal and Visor jobs processing.

#### getPeerClassLoadingExecutorService

    public ExecutorService getPeerClassLoadingExecutorService()

Returns:
  Thread pool implementation to be used for peer class loading requests handling.

#### getDataStreamerExecutorService

    public StripedExecutor getDataStreamerExecutorService()

Executor service that is in charge of processing data stream messages.

Returns:
  Thread pool implementation to be used for data stream messages.

#### getRestExecutorService

    public ExecutorService getRestExecutorService()

Should return an instance of fully configured thread pool to be used for processing of client messages (REST requests).

Returns:
  Thread pool implementation to be used for processing of client messages.

#### getAffinityExecutorService

    public ExecutorService getAffinityExecutorService()

Get affinity executor service.

Returns:
  Affinity executor service.

#### getIndexingExecutorService

    @Nullable
    public @Nullable ExecutorService getIndexingExecutorService()

Get indexing executor service.

Returns:
  Indexing executor service.

#### getQueryExecutorService

    public ExecutorService getQueryExecutorService()

Executor service that is in charge of processing query messages.

Returns:
  Thread pool implementation to be used in grid for query messages.

#### customExecutors

    @Nullable
    public @Nullable Map<String,? extends ExecutorService> customExecutors()

Executor services that is in charge of processing user compute task.

Returns:
  Map of custom thread pool executors.

#### getSchemaExecutorService

    public ExecutorService getSchemaExecutorService()

Executor service that is in charge of processing schema change messages.

Returns:
  Executor service that is in charge of processing schema change messages.

#### getRebalanceExecutorService

    public ExecutorService getRebalanceExecutorService()

Executor service that is in charge of processing rebalance messages.

Returns:
  Executor service that is in charge of processing rebalance messages.

#### getSnapshotExecutorService

    public ExecutorService getSnapshotExecutorService()

Returns:
  Executor service that is used for processing snapshot tasks (taking, sending, restoring).

#### getThinClientExecutorService

    public ExecutorService getThinClientExecutorService()

Executor service for thin clients.

Returns:
  Executor service for thin clients.

#### getStripedRebalanceExecutorService

    public IgniteStripedThreadPoolExecutor getStripedRebalanceExecutorService()

Executor service that is in charge of processing unorderable rebalance messages.

Returns:
  Executor service that is in charge of processing unorderable rebalance messages.

#### buildIndexExecutorService

    public ExecutorService buildIndexExecutorService()

Return Thread pool for create/rebuild indexes.

Returns:
  Thread pool for create/rebuild indexes.

#### getReencryptionExecutorService

    public ExecutorService getReencryptionExecutorService()

Returns:
  Executor to perform a data pages scanning during cache group re-encryption.

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.15.0
Release Date | : April 25 2023