@Override public UserSweepInfo getCurrentSweep(String userId) { UserSweepInfo sweepInfo = userSweepInfoDaoRedisImpl.getCurrentSweep(userId); if (sweepInfo == null) { sweepInfo = userSweepInfoDaoMysqlImpl.getCurrentSweep(userId); userSweepInfoDaoRedisImpl.add(sweepInfo); } return sweepInfo; }
@Override public boolean updateSweepReceived(String userId) { if (userSweepInfoDaoMysqlImpl.updateSweepReceived(userId)) { return userSweepInfoDaoRedisImpl.updateSweepReceived(userId); } return false; }
@Override public boolean stopSweep(String userId) { if (userSweepInfoDaoMysqlImpl.stopSweep(userId)) { return userSweepInfoDaoRedisImpl.stopSweep(userId); } return false; }
@Override public boolean add(UserSweepInfo sweepInfo) { if (userSweepInfoDaoMysqlImpl.add(sweepInfo)) { return userSweepInfoDaoRedisImpl.add(sweepInfo); } return false; }
@Override public void clearOnLoginOut(String userId) throws Exception { userSweepInfoDaoRedisImpl.deleteEntry(userId); }