use of com.dangdang.ddframe.rdb.sharding.executor.event.DQLExecutionEvent in project sharding-jdbc by dangdangdotcom.
the class EventPostman method postExecutionEventsAfterExecution.
void postExecutionEventsAfterExecution(final AbstractExecutorWrapper statementExecutorWrapper, final EventExecutionType eventExecutionType, final Optional<SQLException> exp) {
if (statementExecutorWrapper.getDMLExecutionEvent().isPresent()) {
DMLExecutionEvent event = statementExecutorWrapper.getDMLExecutionEvent().get();
event.setEventExecutionType(eventExecutionType);
event.setExp(exp);
DMLExecutionEventBus.post(event);
} else if (statementExecutorWrapper.getDQLExecutionEvent().isPresent()) {
DQLExecutionEvent event = statementExecutorWrapper.getDQLExecutionEvent().get();
event.setEventExecutionType(eventExecutionType);
event.setExp(exp);
DQLExecutionEventBus.post(event);
}
}
Aggregations