Class TaskBatcher.BatchedTask

All Implemented Interfaces:
java.lang.Comparable<PrioritizedRunnable>, java.lang.Runnable
Enclosing class:

protected abstract class TaskBatcher.BatchedTask
extends SourcePrioritizedRunnable
Represents a runnable task that supports batching. Implementors of TaskBatcher can subclass this to add a payload to the task.
  • Field Summary

    Modifier and Type Field Description
    protected java.lang.Object batchingKey
    the object that is used as batching key
    protected java.util.concurrent.atomic.AtomicBoolean processed
    whether the task has been processed already
    protected java.lang.Object task
    the task object that is wrapped

    Fields inherited from class org.elasticsearch.cluster.service.SourcePrioritizedRunnable

  • Constructor Summary

    Modifier Constructor Description
    protected BatchedTask​(Priority priority, java.lang.String source, java.lang.Object batchingKey, java.lang.Object task)  
  • Method Summary

    Modifier and Type Method Description
    abstract java.lang.String describeTasks​(java.util.List<? extends TaskBatcher.BatchedTask> tasks)  
    java.lang.Object getTask()  
    void run()  
    java.lang.String toString()  

    Methods inherited from class org.elasticsearch.cluster.service.SourcePrioritizedRunnable


    Methods inherited from class org.elasticsearch.common.util.concurrent.PrioritizedRunnable

    compareTo, getAgeInMillis, getCreationDateInNanos, priority, wrap

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • processed

      protected final java.util.concurrent.atomic.AtomicBoolean processed
      whether the task has been processed already
    • batchingKey

      protected final java.lang.Object batchingKey
      the object that is used as batching key
    • task

      protected final java.lang.Object task
      the task object that is wrapped
  • Constructor Details

    • BatchedTask

      protected BatchedTask​(Priority priority, java.lang.String source, java.lang.Object batchingKey, java.lang.Object task)
  • Method Details