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:
Serializable
,EventManager
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:
-
Field Summary
Fields inherited from class org.apache.openjpa.lib.util.concurrent.AbstractConcurrentEventManager
_listeners
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addListener
(Object listener) Register an event listener.protected void
Fire the given event to all registered listeners.boolean
Whether there are any begin transaction listeners.boolean
Whether there are any end transaction listeners.boolean
Whether there are any flush transaction listeners.boolean
removeListener
(Object listener) Remove an event listener.Methods inherited from class org.apache.openjpa.lib.util.concurrent.AbstractConcurrentEventManager
fireEvent, getListeners, hasListener, hasListeners, isFailFast, newListenerCollection, setFailFast
-
Constructor Details
-
TransactionEventManager
public TransactionEventManager()
-
-
Method Details
-
addListener
Description copied from class:AbstractConcurrentEventManager
Register an event listener.- Specified by:
addListener
in interfaceEventManager
- Overrides:
addListener
in classAbstractConcurrentEventManager
-
removeListener
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
Fire the given event to all registered listeners.- Specified by:
fireEvent
in classAbstractConcurrentEventManager
-