public class TransactedEventServiceImpl extends Object implements TransactedEventService, EventTransactionListener
When an event is raised within an operation it will be ignored (since the operation contains all the information about the modifications that were done by the operation).
If there is any active operation then events will be stacked until commit is done.
When in an operation context the operations will be stacked until commit is done. (events are ignored)
Most of the time there will be any one operation stacked (the root one) - this depends on whether child
operation notifications are blocked or not. See Operation.BLOCK_CHILD_NOTIFICATIONS
Constructor and Description |
---|
TransactedEventServiceImpl() |
Modifier and Type | Method and Description |
---|---|
void |
addListener(TransactedListener listener) |
void |
record(Object event) |
void |
recordEvent(CoreEvent event) |
void |
recordOperation(Operation<?> event) |
void |
removeListener(TransactedListener listener) |
void |
transactionCommitted()
Invoked multiple time when the transaction is committing, one for
each session supported by the transaction.
|
void |
transactionRollbacked()
Invoked multiple time when the transaction is roll-backing, one for each
session supported by the transaction.
|
void |
transactionStarted()
Invoked multiple time each time a session is created
inside a transaction.
|
public void addListener(TransactedListener listener)
addListener
in interface TransactedEventService
public void removeListener(TransactedListener listener)
removeListener
in interface TransactedEventService
public void record(Object event)
record
in interface TransactedEventService
public void recordEvent(CoreEvent event)
recordEvent
in interface TransactedEventService
public void recordOperation(Operation<?> event)
recordOperation
in interface TransactedEventService
public void transactionStarted()
EventTransactionListener
transactionStarted
in interface EventTransactionListener
transactionStarted
in interface TransactedEventService
public void transactionCommitted()
EventTransactionListener
transactionCommitted
in interface EventTransactionListener
transactionCommitted
in interface TransactedEventService
public void transactionRollbacked()
EventTransactionListener
transactionRollbacked
in interface EventTransactionListener
transactionRollbacked
in interface TransactedEventService
Copyright © 2011 Nuxeo SA. All Rights Reserved.