org.hibernate.search.backend.jgroups.impl

## Class JGroupsBackendQueueProcessor

- java.lang.Object
- - org.hibernate.search.backend.jgroups.impl.JGroupsBackendQueueProcessor

- All Implemented Interfaces:
    BackendQueueProcessor

      public class JGroupsBackendQueueProcessor
      extends Object
      implements BackendQueueProcessor

  This index backend is able to switch dynamically between a standard Lucene index writing backend and one which sends work remotely over a JGroups channel.
  Author:
    Lukasz Moren, Sanne Grinovero (C) 2012 Red Hat Inc., Ales Justin

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.hibernate.search.backend.spi.BackendQueueProcessor

      `BackendQueueProcessor.Transactional`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `JGroupsBackendQueueProcessor(NodeSelectorStrategy selectionStrategy, JGroupsBackendQueueTask jgroupsProcessor, Supplier<BackendQueueProcessor> delegatedBackendFactory)`

  - ### Method Summary

    All Methods Instance Methods Concrete 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 `BackendQueueProcessor.applyWork(List, IndexingMonitor)`
    `void` | `applyWork(List<LuceneWork> workList, IndexingMonitor monitor)` Applies a list of operations to the index.
    `boolean` | `blocksForACK()`
    `void` | `close()` Used to shutdown and eventually release resources.
    `BackendQueueProcessor` | `getExistingDelegate()`
    `long` | `getMessageTimeout()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface org.hibernate.search.backend.spi.BackendQueueProcessor

      `initialize`

- - ### Constructor Detail

    - #### JGroupsBackendQueueProcessor

          public JGroupsBackendQueueProcessor(NodeSelectorStrategy selectionStrategy,
                                              JGroupsBackendQueueTask jgroupsProcessor,
                                              Supplier<BackendQueueProcessor> delegatedBackendFactory)

  - ### Method Detail

    - #### close

          public void close()

      Description copied from interface: `BackendQueueProcessor`
      Used to shutdown and eventually release resources. No other method should be used after this one.
      Specified by:
        `close` in interface `BackendQueueProcessor`

    - #### applyWork

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

      Description copied from interface: `BackendQueueProcessor`
      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.
      Specified by:
        `applyWork` in interface `BackendQueueProcessor`
      Parameters:
        `workList` - list of Lucene work instance which need to be applied to the index
        `monitor` - a `IndexingMonitor` object.

    - #### applyStreamWork

          public void applyStreamWork(LuceneWork singleOperation,
                                      IndexingMonitor monitor)

      Description copied from interface: `BackendQueueProcessor`
      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 `BackendQueueProcessor.applyWork(List, IndexingMonitor)`
      Specified by:
        `applyStreamWork` in interface `BackendQueueProcessor`
      Parameters:
        `singleOperation` - single Lucene work instance to be applied to the index
        `monitor` - a `IndexingMonitor` object.

    - #### blocksForACK

          public boolean blocksForACK()

    - #### getExistingDelegate

          public BackendQueueProcessor getExistingDelegate()

    - #### getMessageTimeout

          public long getMessageTimeout()

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