org.hibernate.search.event.impl

## Class EventSourceTransactionContext

- java.lang.Object
- - org.hibernate.search.event.impl.EventSourceTransactionContext

- All Implemented Interfaces:
    Serializable, TransactionContext

      public class EventSourceTransactionContext
      extends Object
      implements TransactionContext, Serializable

  Implementation of the transactional context on top of an EventSource (Session)
  Author:
    Navin Surtani - navin@surtani.org, Emmanuel Bernard, Sanne Grinovero
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `EventSourceTransactionContext(EventSource eventSource)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Object` | `getTransactionIdentifier()`
    `boolean` | `isTransactionInProgress()`
    `void` | `registerSynchronization(Synchronization synchronization)` Register the given synchronization.

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

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

- - ### Constructor Detail

    - #### EventSourceTransactionContext

          public EventSourceTransactionContext(EventSource eventSource)

  - ### Method Detail

    - #### getTransactionIdentifier

          public Object getTransactionIdentifier()

      Specified by:
        `getTransactionIdentifier` in interface `TransactionContext`
      Returns:
        a transaction object.

    - #### registerSynchronization

          public void registerSynchronization(Synchronization synchronization)

      Description copied from interface: `TransactionContext`
      Register the given synchronization.
      Specified by:
        `registerSynchronization` in interface `TransactionContext`
      Parameters:
        `synchronization` - synchronization to register

    - #### isTransactionInProgress

          public boolean isTransactionInProgress()

      Specified by:
        `isTransactionInProgress` in interface `TransactionContext`
      Returns:
        A boolean indicating whether a transaction is in progress or not.

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