Module org.elasticsearch.server
Package org.elasticsearch.persistent
Class PersistentTasksExecutorRegistry
java.lang.Object
org.elasticsearch.persistent.PersistentTasksExecutorRegistry
Components that registers all persistent task executors
-
Constructor Summary
ConstructorsConstructorDescriptionPersistentTasksExecutorRegistry(Collection<PersistentTasksExecutor<?>> taskExecutors) -
Method Summary
Modifier and TypeMethodDescription<Params extends PersistentTaskParams>
PersistentTasksExecutor<Params> getPersistentTaskExecutorSafe(String taskName) static booleanisClusterScopedTask(String taskName) Returnstrueif the given task name corresponds to an executor with aPersistentTasksExecutor.scope()ofPersistentTasksExecutor.Scope.CLUSTER.static booleantaskHasReassignmentOnShutdownDisabled(String taskName) Returnstrueif the given task executor has thePersistentTasksExecutor.automaticReassignmentOnShutdown()flag set tofalse.
-
Constructor Details
-
PersistentTasksExecutorRegistry
-
-
Method Details
-
getPersistentTaskExecutorSafe
public <Params extends PersistentTaskParams> PersistentTasksExecutor<Params> getPersistentTaskExecutorSafe(String taskName) -
isClusterScopedTask
Returnstrueif the given task name corresponds to an executor with aPersistentTasksExecutor.scope()ofPersistentTasksExecutor.Scope.CLUSTER.- Parameters:
taskName- the name of the persistent task to check
-
taskHasReassignmentOnShutdownDisabled
Returnstrueif the given task executor has thePersistentTasksExecutor.automaticReassignmentOnShutdown()flag set tofalse. Using a precomputed set avoids repeated registry lookups during reassignment checks.- Parameters:
taskName- the name of the persistent task to check
-