org.hibernate.search.backend.spi

## Interface Backend

- All Known Implementing Classes:
    BlackHoleBackend, JGroupsBackend, JGroupsMasterBackend, JGroupsSlaveBackend, JndiJMSBackend, LocalBackend, ReflectionBasedBackend

      public interface Backend

  Interface for different types of queue processors. Implementations need a no-arg constructor.
  Author:
    Yoann Rodiere
  Experimental
    This type is under active development. You should be prepared for incompatible changes in future releases.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `default void` | `close()` Used to shutdown and eventually release resources.
    `BackendQueueProcessor` | `createQueueProcessor(IndexManager indexManager, WorkerBuildContext context)` Called exactly once for each index manager using this backend.
    `default void` | `initialize(Properties properties, WorkerBuildContext context)` Used at startup, called once as first method.
    `default boolean` | `isTransactional()`

- - ### Method Detail

    - #### initialize

          default void initialize(Properties properties,
                                  WorkerBuildContext context)

      Used at startup, called once as first method.
      Parameters:
        `properties` - all configuration properties
        `context` - context giving access to required meta data

    - #### close

          default void close()

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

      The `produced queue processors` are guaranteed to be closed before this is called.

    - #### isTransactional

          default boolean isTransactional()

      Returns:
        `true` if this backend is able to enlist in ongoing transactions.

    - #### createQueueProcessor

          BackendQueueProcessor createQueueProcessor(IndexManager indexManager,
                                                     WorkerBuildContext context)

      Called exactly once for each index manager using this backend.
      Parameters:
        `indexManager` - the `IndexManager` the `BackendQueueProcessor` will point to
        `context` - context giving access to required meta data
      Returns:
        a `BackendQueueProcessor` that will send its works to the given index manager

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