Class IndexingBatchTask<T extends Searchable>

  • Type Parameters:
    T -
    All Implemented Interfaces:
    BatchTask<T>

    public class IndexingBatchTask<T extends Searchable>
    extends Object
    implements BatchTask<T>
    A decorating batch task, re-indexing the searchable that the task is applied to.

    The delegate task is applied first, before the indexing occurs.

    • Method Detail

      • apply

        public boolean apply​(T item,
                             int index,
                             int batchSize)
                      throws Exception
        Specified by:
        apply in interface BatchTask<T extends Searchable>
        Parameters:
        item - the item to be operate on
        index - the index of this item in its batch
        batchSize - the size of the batch
        Returns:
        true if the item required work to be done, false otherwise
        Throws:
        Exception