org.hibernate.search.backend.spi

## Interface BackendQueueProcessor

- All Known Implementing Classes:
    BlackHoleBackendQueueProcessor, JGroupsBackendQueueProcessor, JmsBackendQueueProcessor, JndiJMSBackendQueueProcessor, LocalBackendQueueProcessor

      public interface BackendQueueProcessor

  Interface for different types of queue processors. Implementations need a no-arg constructor.
  Author:
    Emmanuel Bernard, Sanne Grinovero

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Interface and Description
    --- | ---
    `static interface` | `BackendQueueProcessor.Transactional` Marker interface describing a backend processor that is transactional

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `applyStreamWork(LuceneWork singleOperation, IndexingMonitor monitor)` Applies a single operation on the index, and different operations can be applied in parallel, even in parallel to a workList instance being processed by `applyWork(List, IndexingMonitor)`
    `void` | `applyWork(List<LuceneWork> workList, IndexingMonitor monitor)` Applies a list of operations to the index.
    `void` | `close()` Used to shutdown and eventually release resources.
    `default void` | `initialize(Properties props, WorkerBuildContext context, IndexManager indexManager)` Deprecated. Use a `Backend` implementation and implement your initialization logic in `Backend.createQueueProcessor(IndexManager, WorkerBuildContext)` instead.

- - ### Method Detail

    - #### initialize

          @Deprecated
          default void initialize(Properties props,
                                              WorkerBuildContext context,
                                              IndexManager indexManager)

      Deprecated. Use a `Backend` implementation and implement your initialization logic in `Backend.createQueueProcessor(IndexManager, WorkerBuildContext)` instead.
      Used at startup, called once as first method.
      Parameters:
        `props` - all configuration properties
        `context` - context giving access to required meta data
        `indexManager` - the index it is related to.

    - #### close

          void close()

      Used to shutdown and eventually release resources. No other method should be used after this one.

    - #### applyWork

          void applyWork(List<LuceneWork> workList,
                         IndexingMonitor monitor)

      Applies a list of operations to the index. A single list might be processed by applying elements in parallel threads, but no work should be started on a new workList until the previous one was fully processed. Work could be applied asynchronously according to capabilities and configuration of implementor. A null parameter is not acceptable, implementations should throw an IllegalArgumentException.
      Parameters:
        `workList` - list of Lucene work instance which need to be applied to the index
        `monitor` - a `IndexingMonitor` object.

    - #### applyStreamWork

          void applyStreamWork(LuceneWork singleOperation,
                               IndexingMonitor monitor)

      Applies a single operation on the index, and different operations can be applied in parallel, even in parallel to a workList instance being processed by `applyWork(List, IndexingMonitor)`
      Parameters:
        `singleOperation` - single Lucene work instance to be applied to the index
        `monitor` - a `IndexingMonitor` object.

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