@SuppressWarnings("rawtypes") @Override public boolean processEvents(List<AsyncEvent> events) { LOG.info("processEvents: events.size={}", events.size()); try { for (AsyncEvent event : events) { LOG.info("processEvents: event={}", event); Operation op = event.getOperation(); Account acct = (Account) event.getDeserializedValue(); if ((op.isCreate() || op.isUpdate()) && !op.isLoad()) { LOG.info("processEvents: save: acct={}", acct); mapper.save(acct); } else if (op.isDestroy() && !op.isEviction() && !op.isExpiration()) { LOG.info("processEvents: delete: acct={}", acct); mapper.delete(acct); } } } catch (Exception x) { LOG.error("processEvents: x={}", x.toString(), x); } return true; }
public ProjectRegionMilestone save(ProjectRegionMilestone projectRegionMilestone) { if (projectRegionMilestone.getId() == null) { projectRegionMilestone.setId(UUID.randomUUID()); } mapper.save(projectRegionMilestone); return projectRegionMilestone; }
public void saveConnection(SocialUserConnection socialUserConnection) { try { mapper.save(socialUserConnection); } catch (Exception e) { e.printStackTrace(); } }
@Override public UUID saveSum(DBCheckSum dbCheckSum) { dbCheckSumMapper.save(dbCheckSum); return dbCheckSum.getId(); }