org.hibernate.search.elasticsearch.work.impl

## Class SimpleBulkableElasticsearchWork<R>

- java.lang.Object
- - org.hibernate.search.elasticsearch.work.impl.SimpleElasticsearchWork<R>
  - - org.hibernate.search.elasticsearch.work.impl.SimpleBulkableElasticsearchWork<R>

- All Implemented Interfaces:
    BulkableElasticsearchWork<R>, ElasticsearchWork<R>
  Direct Known Subclasses:
    DeleteWork, IndexWork

      public abstract class SimpleBulkableElasticsearchWork<R>
      extends SimpleElasticsearchWork<R>
      implements BulkableElasticsearchWork<R>

  Author:
    Yoann Rodiere

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `protected static class` | `SimpleBulkableElasticsearchWork.Builder<B>`

  - ### Field Summary

    - ### Fields inherited from class org.hibernate.search.elasticsearch.work.impl.SimpleElasticsearchWork

      `dirtiedIndexName, markIndexDirty, request, resultAssessor`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `SimpleBulkableElasticsearchWork(SimpleBulkableElasticsearchWork.Builder<?> builder)`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `aggregate(ElasticsearchWorkAggregator aggregator)`
    `protected CompletableFuture<?>` | `beforeExecute(ElasticsearchWorkExecutionContext executionContext, ElasticsearchRequest request)`
    `protected abstract R` | `generateResult(ElasticsearchWorkExecutionContext context, com.google.gson.JsonObject bulkResponseItem)`
    `com.google.gson.JsonObject` | `getBulkableActionBody()`
    `com.google.gson.JsonObject` | `getBulkableActionMetadata()`
    `CompletableFuture<R>` | `handleBulkResult(ElasticsearchWorkExecutionContext context, com.google.gson.JsonObject bulkResponseItem)`

    - ### Methods inherited from class org.hibernate.search.elasticsearch.work.impl.SimpleElasticsearchWork

      `afterSuccess, execute, generateResult, getLuceneWork, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface org.hibernate.search.elasticsearch.work.impl.ElasticsearchWork

      `execute, getLuceneWork`

- - ### Constructor Detail

    - #### SimpleBulkableElasticsearchWork

          protected SimpleBulkableElasticsearchWork(SimpleBulkableElasticsearchWork.Builder<?> builder)

  - ### Method Detail

    - #### aggregate

          public void aggregate(ElasticsearchWorkAggregator aggregator)

      Specified by:
        `aggregate` in interface `ElasticsearchWork<R>`
      Overrides:
        `aggregate` in class `SimpleElasticsearchWork<R>`

    - #### getBulkableActionMetadata

          public com.google.gson.JsonObject getBulkableActionMetadata()

      Specified by:
        `getBulkableActionMetadata` in interface `BulkableElasticsearchWork<R>`

    - #### getBulkableActionBody

          public com.google.gson.JsonObject getBulkableActionBody()

      Specified by:
        `getBulkableActionBody` in interface `BulkableElasticsearchWork<R>`

    - #### handleBulkResult

          public CompletableFuture<R> handleBulkResult(ElasticsearchWorkExecutionContext context,
                                                       com.google.gson.JsonObject bulkResponseItem)

      Specified by:
        `handleBulkResult` in interface `BulkableElasticsearchWork<R>`
      Parameters:
        `context` - The execution context
        `bulkResponseItem` - A future eventually returning the part of the bulk JSON result relevant to this work
      Returns:
        a future eventually returning the result of this work

    - #### beforeExecute

          protected final CompletableFuture<?> beforeExecute(ElasticsearchWorkExecutionContext executionContext,
                                                             ElasticsearchRequest request)

      Overrides:
        `beforeExecute` in class `SimpleElasticsearchWork<R>`

    - #### generateResult

          protected abstract R generateResult(ElasticsearchWorkExecutionContext context,
                                              com.google.gson.JsonObject bulkResponseItem)

Copyright © 2006-2017 Red Hat, Inc. All Rights Reserved