Package org.nuxeo.elasticsearch.bulk
Class IndexCompletionComputation
- java.lang.Object
-
- org.nuxeo.lib.stream.computation.AbstractComputation
-
- org.nuxeo.elasticsearch.bulk.IndexCompletionComputation
-
- All Implemented Interfaces:
Computation
public class IndexCompletionComputation extends AbstractComputation
On indexing completion, do extra tasks like refresh or update index alias.- Since:
- 10.3
-
-
Field Summary
Fields Modifier and Type Field Description protected Codec<BulkStatus>
codec
static String
NAME
-
Fields inherited from class org.nuxeo.lib.stream.computation.AbstractComputation
INPUT_1, INPUT_2, INPUT_3, INPUT_NULL, metadata, OUTPUT_1, OUTPUT_2, OUTPUT_3, OUTPUT_4
-
-
Constructor Summary
Constructors Constructor Description IndexCompletionComputation()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
init(ComputationContext context)
Called when the framework has registered the computation successfully.protected void
logIndexing(BulkStatus status)
void
processRecord(ComputationContext context, String inputStream, Record record)
Process an incoming record on one of the computation's input streams.protected void
refreshIndexIfNeeded(BulkCommand command)
protected void
updateAliasIfNeeded(BulkCommand command)
-
Methods inherited from class org.nuxeo.lib.stream.computation.AbstractComputation
metadata, processFailure, processRetry, processTimer
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.nuxeo.lib.stream.computation.Computation
destroy, signalStop
-
-
-
-
Field Detail
-
NAME
public static final String NAME
- See Also:
- Constant Field Values
-
codec
protected Codec<BulkStatus> codec
-
-
Method Detail
-
init
public void init(ComputationContext context)
Description copied from interface:Computation
Called when the framework has registered the computation successfully. Gives users a first opportunity to schedule timer callbacks and produce records. This method can be called multiple times.- Specified by:
init
in interfaceComputation
- Overrides:
init
in classAbstractComputation
- Parameters:
context
- The computation context object provided by the system.
-
processRecord
public void processRecord(ComputationContext context, String inputStream, Record record)
Description copied from interface:Computation
Process an incoming record on one of the computation's input streams.- Parameters:
context
- The computation context object provided by the system.inputStream
- Name of the input stream that provides the record.record
- The record.
-
refreshIndexIfNeeded
protected void refreshIndexIfNeeded(BulkCommand command)
-
updateAliasIfNeeded
protected void updateAliasIfNeeded(BulkCommand command)
-
logIndexing
protected void logIndexing(BulkStatus status)
-
-