org.hibernate.search.backend.impl

## Class InTransactionWorkQueueSynchronization

- java.lang.Object
- - org.hibernate.search.backend.impl.InTransactionWorkQueueSynchronization

- All Implemented Interfaces:
    Synchronization, WorkQueueSynchronization

      public class InTransactionWorkQueueSynchronization
      extends Object
      implements WorkQueueSynchronization

  Execute final work inside a transaction.
  Author:
    Emmanuel Bernard

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `InTransactionWorkQueueSynchronization(Object transactionIdentifier, QueueingProcessor queueingProcessor, ConcurrentMap<Object,WorkQueueSynchronization> queuePerTransaction, ExtendedSearchIntegrator extendedIntegrator)` In transaction work

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `add(Work work)` Add some work to the transaction queue.
    `void` | `afterCompletion(int status)`
    `void` | `beforeCompletion()`
    `void` | `flushWorks()` Flush the queue by executing the workload
    `boolean` | `isConsumed()` Whether or not this queue has been consumed

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

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

- - ### Constructor Detail

    - #### InTransactionWorkQueueSynchronization

          public InTransactionWorkQueueSynchronization(Object transactionIdentifier,
                                                       QueueingProcessor queueingProcessor,
                                                       ConcurrentMap<Object,WorkQueueSynchronization> queuePerTransaction,
                                                       ExtendedSearchIntegrator extendedIntegrator)

      In transaction work
      Parameters:
        `transactionIdentifier` - the identifier of the transaction
        `queueingProcessor` - the `QueueingProcessor`
        `queuePerTransaction` - the map containing the queue for eeach transaction
        `extendedIntegrator` - the `ExtendedSearchIntegrator`

  - ### Method Detail

    - #### add

          public void add(Work work)

      Description copied from interface: `WorkQueueSynchronization`
      Add some work to the transaction queue.
      Specified by:
        `add` in interface `WorkQueueSynchronization`
      Parameters:
        `work` - the work to add

    - #### isConsumed

          public boolean isConsumed()

      Description copied from interface: `WorkQueueSynchronization`
      Whether or not this queue has been consumed
      Specified by:
        `isConsumed` in interface `WorkQueueSynchronization`
      Returns:
        `true` if the work has been consumed

    - #### beforeCompletion

          public void beforeCompletion()

      Specified by:
        `beforeCompletion` in interface `Synchronization`

    - #### afterCompletion

          public void afterCompletion(int status)

      Specified by:
        `afterCompletion` in interface `Synchronization`

    - #### flushWorks

          public void flushWorks()

      Description copied from interface: `WorkQueueSynchronization`
      Flush the queue by executing the workload
      Specified by:
        `flushWorks` in interface `WorkQueueSynchronization`

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