Module org.elasticsearch.server
Class TaskBatcher.BatchedTask
java.lang.Object
org.elasticsearch.common.util.concurrent.PrioritizedRunnable
org.elasticsearch.cluster.service.SourcePrioritizedRunnable
org.elasticsearch.cluster.service.TaskBatcher.BatchedTask
- All Implemented Interfaces:
Comparable<PrioritizedRunnable>,Runnable
- Enclosing class:
- TaskBatcher
Represents a runnable task that supports batching.
Implementors of TaskBatcher can subclass this to add a payload to the task.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Objectthe object that is used as batching keyprotected final AtomicBooleanwhether the task has been processed alreadyprotected final Objectthe task object that is wrappedFields inherited from class org.elasticsearch.cluster.service.SourcePrioritizedRunnable
source -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedBatchedTask(Priority priority, String source, Object batchingKey, Object task) -
Method Summary
Modifier and TypeMethodDescriptionabstract StringdescribeTasks(List<? extends TaskBatcher.BatchedTask> tasks) getTask()voidrun()toString()Methods inherited from class org.elasticsearch.cluster.service.SourcePrioritizedRunnable
sourceMethods inherited from class org.elasticsearch.common.util.concurrent.PrioritizedRunnable
compareTo, getAgeInMillis, getCreationDateInNanos, priority, wrap
-
Field Details
-
processed
whether the task has been processed already -
batchingKey
the object that is used as batching key -
task
the task object that is wrapped
-
-
Constructor Details
-
BatchedTask
-
-
Method Details
-
run
public void run() -
toString
- Overrides:
toStringin classSourcePrioritizedRunnable
-
describeTasks
-
getTask
-