org.hibernate.search.backend.jgroups.impl

## Class JGroupsBackend

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

- All Implemented Interfaces:
    Backend
  Direct Known Subclasses:
    JGroupsMasterBackend, JGroupsSlaveBackend

      public class JGroupsBackend
      extends Object
      implements Backend

  Author:
    Yoann Rodiere

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `BLOCK_WAITING_ACK` Configuration property specific to the backend instance.
    `static int` | `DEFAULT_MESSAGE_TIMEOUT` Default value for the `MESSAGE_TIMEOUT_MS` configuration property.
    `static String` | `DELEGATE_BACKEND` This JGroups backend is meant to delegate to a different backend on the master node.
    `static String` | `MESSAGE_TIMEOUT_MS` Specifies the timeout defined on messages sent to other nodes via the JGroups Channel.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `JGroupsBackend()`

  - ### Method Summary

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

    - ### 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.Backend

      `isTransactional`

- - ### Field Detail

    - #### BLOCK_WAITING_ACK

          public static final String BLOCK_WAITING_ACK

      Configuration property specific to the backend instance. When enabled the invoker thread will use JGroups in synchronous mode waiting for the ACK from the other parties; when disabled it is going to behave as fire and forget: delegates reliability to the JGroups configuration and returns immediately. The default value depends on the backend configuration: if it's set to async, then block_waiting_ack defaults to false.
      See Also:
        `Environment.WORKER_EXECUTION`, Constant Field Values

    - #### DELEGATE_BACKEND

          public static final String DELEGATE_BACKEND

      This JGroups backend is meant to delegate to a different backend on the master node. Generally this is expected to be the Lucene backend, but this property allows to specify a different implementation for the delegate.
      See Also:
        Constant Field Values

    - #### MESSAGE_TIMEOUT_MS

          public static final String MESSAGE_TIMEOUT_MS

      Specifies the timeout defined on messages sent to other nodes via the JGroups Channel. Value interpreted in milliseconds.
      See Also:
        Constant Field Values

    - #### DEFAULT_MESSAGE_TIMEOUT

          public static final int DEFAULT_MESSAGE_TIMEOUT

      Default value for the `MESSAGE_TIMEOUT_MS` configuration property.
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### JGroupsBackend

          public JGroupsBackend()

  - ### Method Detail

    - #### initialize

          public void initialize(Properties properties,
                                 WorkerBuildContext context)

      Description copied from interface: `Backend`
      Used at startup, called once as first method.
      Specified by:
        `initialize` in interface `Backend`
      Parameters:
        `properties` - all configuration properties
        `context` - context giving access to required meta data

    - #### close

          public void close()

      Description copied from interface: `Backend`
      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.

      Specified by:
        `close` in interface `Backend`

    - #### createQueueProcessor

          public JGroupsBackendQueueProcessor createQueueProcessor(IndexManager indexManager,
                                                                   WorkerBuildContext context)

      Description copied from interface: `Backend`
      Called exactly once for each index manager using this backend.
      Specified by:
        `createQueueProcessor` in interface `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

    - #### createNodeSelectorStrategy

          protected NodeSelectorStrategy createNodeSelectorStrategy(IndexManager indexManager)

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