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
On indexing completion, do extra tasks like refresh or update index alias.
- Since:
- 10.3
-
Field Summary
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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
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 Details
-
NAME
- See Also:
-
codec
-
-
Constructor Details
-
IndexCompletionComputation
public IndexCompletionComputation()
-
-
Method Details
-
init
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
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
-
updateAliasIfNeeded
-
logIndexing
-