org.hibernate.search.backend.spi

## Interface Worker

- All Known Implementing Classes:
    PerTransactionWorker

      public interface Worker

  Perform work for a given context (eg a transaction). This implementation has to be threaded-safe.
  Author:
    Emmanuel Bernard

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()` clean resources This method can return exceptions
    `void` | `flushWorks(TransactionContext transactionContext)` Flush any work queue.
    `void` | `initialize(Properties props, WorkerBuildContext context, QueueingProcessor queueingProcessor)`
    `void` | `performWork(Work work, TransactionContext transactionContext)` Declare a work to be done within a given transaction context

- - ### Method Detail

    - #### performWork

          void performWork(Work work,
                           TransactionContext transactionContext)

      Declare a work to be done within a given transaction context
      Parameters:
        `work` - the work to be executed
        `transactionContext` - transactional context information

    - #### initialize

          void initialize(Properties props,
                          WorkerBuildContext context,
                          QueueingProcessor queueingProcessor)

    - #### close

          void close()

      clean resources This method can return exceptions

    - #### flushWorks

          void flushWorks(TransactionContext transactionContext)

      Flush any work queue.
      Parameters:
        `transactionContext` - the current transaction (context).

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