public abstract class SimpleElasticsearchWork<R> extends Object implements ElasticsearchWork<R>
Modifier and Type | Class and Description |
---|---|
protected static class |
SimpleElasticsearchWork.Builder<B> |
Modifier and Type | Field and Description |
---|---|
protected URLEncodedString |
dirtiedIndexName |
protected boolean |
markIndexDirty |
protected ElasticsearchRequest |
request |
protected ElasticsearchRequestSuccessAssessor |
resultAssessor |
Modifier | Constructor and Description |
---|---|
protected |
SimpleElasticsearchWork(SimpleElasticsearchWork.Builder<?> builder) |
Modifier and Type | Method and Description |
---|---|
protected CompletableFuture<?> |
afterSuccess(ElasticsearchWorkExecutionContext executionContext) |
void |
aggregate(ElasticsearchWorkAggregator aggregator) |
protected CompletableFuture<?> |
beforeExecute(ElasticsearchWorkExecutionContext executionContext,
ElasticsearchRequest request) |
CompletableFuture<R> |
execute(ElasticsearchWorkExecutionContext executionContext) |
protected abstract R |
generateResult(ElasticsearchWorkExecutionContext context,
ElasticsearchResponse response) |
LuceneWork |
getLuceneWork() |
String |
toString() |
protected final ElasticsearchRequest request
protected final URLEncodedString dirtiedIndexName
protected final ElasticsearchRequestSuccessAssessor resultAssessor
protected final boolean markIndexDirty
protected SimpleElasticsearchWork(SimpleElasticsearchWork.Builder<?> builder)
public final CompletableFuture<R> execute(ElasticsearchWorkExecutionContext executionContext)
execute
in interface ElasticsearchWork<R>
protected CompletableFuture<?> beforeExecute(ElasticsearchWorkExecutionContext executionContext, ElasticsearchRequest request)
protected CompletableFuture<?> afterSuccess(ElasticsearchWorkExecutionContext executionContext)
protected abstract R generateResult(ElasticsearchWorkExecutionContext context, ElasticsearchResponse response)
public void aggregate(ElasticsearchWorkAggregator aggregator)
aggregate
in interface ElasticsearchWork<R>
public LuceneWork getLuceneWork()
getLuceneWork
in interface ElasticsearchWork<R>
Copyright © 2006-2017 Red Hat, Inc. All Rights Reserved