Package org.apache.openjpa.event
Class TransactionEventManager
- java.lang.Object
-
- org.apache.openjpa.lib.util.concurrent.AbstractConcurrentEventManager
-
- org.apache.openjpa.event.TransactionEventManager
-
- All Implemented Interfaces:
java.io.Serializable
,EventManager
public class TransactionEventManager extends AbstractConcurrentEventManager
Manager that can be used to track and notify transaction listeners of transaction-related events.- Since:
- 0.3.0
- Author:
- Patrick Linskey, Abe White
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.apache.openjpa.lib.util.concurrent.AbstractConcurrentEventManager
_listeners
-
-
Constructor Summary
Constructors Constructor Description TransactionEventManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addListener(java.lang.Object listener)
Register an event listener.protected void
fireEvent(java.lang.Object event, java.lang.Object listener)
Fire the given event to all registered listeners.boolean
hasBeginListeners()
Whether there are any begin transaction listeners.boolean
hasEndListeners()
Whether there are any end transaction listeners.boolean
hasFlushListeners()
Whether there are any flush transaction listeners.boolean
removeListener(java.lang.Object listener)
Remove an event listener.-
Methods inherited from class org.apache.openjpa.lib.util.concurrent.AbstractConcurrentEventManager
fireEvent, getListeners, hasListener, hasListeners, isFailFast, newListenerCollection, setFailFast
-
-
-
-
Method Detail
-
addListener
public void addListener(java.lang.Object listener)
Description copied from class:AbstractConcurrentEventManager
Register an event listener.- Specified by:
addListener
in interfaceEventManager
- Overrides:
addListener
in classAbstractConcurrentEventManager
-
removeListener
public boolean removeListener(java.lang.Object listener)
Description copied from class:AbstractConcurrentEventManager
Remove an event listener.- Specified by:
removeListener
in interfaceEventManager
- Overrides:
removeListener
in classAbstractConcurrentEventManager
-
hasBeginListeners
public boolean hasBeginListeners()
Whether there are any begin transaction listeners.
-
hasFlushListeners
public boolean hasFlushListeners()
Whether there are any flush transaction listeners.
-
hasEndListeners
public boolean hasEndListeners()
Whether there are any end transaction listeners.
-
fireEvent
protected void fireEvent(java.lang.Object event, java.lang.Object listener)
Fire the given event to all registered listeners.- Specified by:
fireEvent
in classAbstractConcurrentEventManager
-
-