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
Modifier and TypeFieldDescriptionprotected Object
the object that is used as batching keyprotected AtomicBoolean
whether the task has been processed alreadyprotected Object
the task object that is wrappedFields inherited from class org.elasticsearch.cluster.service.SourcePrioritizedRunnable
source
-
Constructor Summary
ModifierConstructorDescriptionprotected
BatchedTask(Priority priority, String source, Object batchingKey, Object task)
-
Method Summary
Modifier and TypeMethodDescriptionabstract String
describeTasks(List<? extends TaskBatcher.BatchedTask> tasks)
getTask()
void
run()
toString()
Methods inherited from class org.elasticsearch.cluster.service.SourcePrioritizedRunnable
source
Methods 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:
toString
in classSourcePrioritizedRunnable
-
describeTasks
-
getTask
-