Class 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
    • Constructor Detail

      • IndexCompletionComputation

        public IndexCompletionComputation()
    • 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 interface Computation
        Overrides:
        init in class AbstractComputation
        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)