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 Modifier and Type Field Description static StringACTIVE_COUNT_DESCstatic StringCOMPLETED_TASK_DESCstatic StringCORE_SIZE_DESCstatic StringIS_SHUTDOWN_DESCstatic StringIS_TERMINATED_DESCstatic StringIS_TERMINATING_DESCstatic StringKEEP_ALIVE_TIME_DESCstatic StringLARGEST_SIZE_DESCstatic StringMAX_SIZE_DESCstatic StringPOOL_SIZE_DESCstatic StringQUEUE_SIZE_DESCstatic StringREJ_HND_DESCstatic StringSTREAM_POOL_QUEUE_VIEWName of the system view for a data streamerStripedExecutorqueue view.static StringSTREAM_POOL_QUEUE_VIEW_DESCDescription of the system view for a data streamerStripedExecutorqueue view.static StringSYS_POOL_QUEUE_VIEWName of the system view for a systemStripedExecutorqueue view.static StringSYS_POOL_QUEUE_VIEW_DESCDescription of the system view for a systemStripedExecutorqueue view.static StringTASK_COUNT_DESCstatic StringTASK_EXEC_TIMETask execution time metric name.static StringTASK_EXEC_TIME_DESCTask execution time metric description.static long[]TASK_EXEC_TIME_HISTOGRAM_BUCKETSHistogram buckets for the task execution time metric (in milliseconds).static StringTHRD_FACTORY_DESCstatic StringTHREAD_POOLSGroup for a thread pools.-
Fields inherited from class org.apache.ignite.internal.processors.GridProcessorAdapter
ctx, diagnosticLog, log
-
-
Constructor Summary
Constructors Constructor Description PoolProcessor(GridKernalContext ctx)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IgniteStripedThreadPoolExecutorasyncCallbackPool()Gets async callback pool.ExecutorServicebuildIndexExecutorService()Return Thread pool for create/rebuild indexes.@Nullable ExecutorcustomExecutor(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.ExecutorServicegetAffinityExecutorService()Get affinity executor service.StripedExecutorgetDataStreamerExecutorService()Executor service that is in charge of processing data stream messages.ExecutorServicegetExecutorService()@Nullable ExecutorServicegetIndexingExecutorService()Get indexing executor service.ExecutorServicegetManagementExecutorService()Executor service that is in charge of processing internal and VisorGridJobs.ExecutorServicegetPeerClassLoadingExecutorService()ExecutorServicegetQueryExecutorService()Executor service that is in charge of processing query messages.ExecutorServicegetRebalanceExecutorService()Executor service that is in charge of processing rebalance messages.ExecutorServicegetReencryptionExecutorService()ExecutorServicegetRestExecutorService()Should return an instance of fully configured thread pool to be used for processing of client messages (REST requests).ExecutorServicegetSchemaExecutorService()Executor service that is in charge of processing schema change messages.ExecutorServicegetServiceExecutorService()Executor service that is in charge of processing service proxy invocations.ExecutorServicegetSnapshotExecutorService()StripedExecutorgetStripedExecutorService()Executor service that is in charge of processing internal system messages in stripes (dedicated threads).IgniteStripedThreadPoolExecutorgetStripedRebalanceExecutorService()Executor service that is in charge of processing unorderable rebalance messages.ExecutorServicegetSystemExecutorService()Executor service that is in charge of processing internal system messages.ExecutorServicegetThinClientExecutorService()Executor service for thin clients.ExecutorpoolForPolicy(byte plc)Get executor service for policy.voidregisterMetrics()Registers thread pools metrics and system views.voidstart()Starts grid component.voidstop(boolean cancel)Stops grid component.ExecutorServiceutilityCachePool()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
-
-
-
-
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 streamerStripedExecutorqueue view.
-
STREAM_POOL_QUEUE_VIEW_DESC
public static final String STREAM_POOL_QUEUE_VIEW_DESC
Description of the system view for a data streamerStripedExecutorqueue 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 systemStripedExecutorqueue view.
-
SYS_POOL_QUEUE_VIEW_DESC
public static final String SYS_POOL_QUEUE_VIEW_DESC
Description of the system view for a systemStripedExecutorqueue 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 IgniteCheckedExceptionStarts grid component.- Specified by:
startin interfaceGridComponent- Overrides:
startin classGridProcessorAdapter- Throws:
IgniteCheckedException- Throws in case of any errors.
-
stop
public void stop(boolean cancel) throws IgniteCheckedExceptionStops grid component.- Specified by:
stopin interfaceGridComponent- Overrides:
stopin classGridProcessorAdapter- Parameters:
cancel- Iftrue, 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 VisorGridJobs.- 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.
-
-