use of org.neo4j.kernel.impl.coreapi.TxStateTransactionDataSnapshot in project neo4j by neo4j.
the class TransactionEventHandlers method beforeCommit.
@Override
public TransactionHandlerState beforeCommit(ReadableTransactionState state, KernelTransaction transaction, StoreReadLayer storeReadLayer, StorageStatement statement) {
if (transactionEventHandlers.isEmpty()) {
return null;
}
TransactionData txData = state == null ? EMPTY_DATA : new TxStateTransactionDataSnapshot(state, nodeActions, relationshipActions, storeReadLayer, statement, transaction);
TransactionHandlerState handlerStates = new TransactionHandlerState(txData);
for (TransactionEventHandler<?> handler : this.transactionEventHandlers) {
try {
handlerStates.add(handler, handler.beforeCommit(txData));
} catch (Throwable t) {
handlerStates.failed(t);
}
}
return handlerStates;
}
Aggregations