use of org.neo4j.kernel.internal.event.TransactionListenersState.ListenerState in project neo4j by neo4j.
the class DatabaseTransactionEventListeners method afterCommit.
public void afterCommit(TransactionListenersState listeners) {
if (listeners == null) {
// observe them.
return;
}
TransactionData txData = listeners.getTxData();
try {
for (ListenerState listenerState : listeners.getStates()) {
TransactionEventListener listener = listenerState.getListener();
listener.afterCommit(txData, listenerState.getState(), databaseFacade);
}
} finally {
if (txData instanceof TxStateTransactionDataSnapshot) {
((TxStateTransactionDataSnapshot) txData).close();
}
// else if could be EMPTY_DATA as well, and we don't want the user-facing TransactionData interface to have close() on it
}
}
use of org.neo4j.kernel.internal.event.TransactionListenersState.ListenerState in project neo4j by neo4j.
the class DatabaseTransactionEventListeners method afterRollback.
public void afterRollback(TransactionListenersState listenersState) {
if (listenersState == null) {
// For legacy reasons, we don't call transaction listeners on implicit rollback.
return;
}
TransactionData txData = listenersState.getTxData();
for (ListenerState listenerState : listenersState.getStates()) {
TransactionEventListener listener = listenerState.getListener();
listener.afterRollback(txData, listenerState.getState(), databaseFacade);
}
}
Aggregations