Examples of TimerImpl


Examples of com.sogou.qadev.service.cynthia.bean.impl.TimerImpl

   */
  public Timer createTimer(String createUser)
  {
    UUID id = DataAccessFactory.getInstance().newUUID("TIME");
    Timestamp createTime = new Timestamp(System.currentTimeMillis());
    return new TimerImpl(id, createUser, createTime);
  }
View Full Code Here

Examples of com.sogou.qadev.service.cynthia.bean.impl.TimerImpl

      while(rst.next())
      {
        UUID id = DataAccessFactory.getInstance().createUUID(rst.getObject("id").toString());
        Timestamp createTime = rst.getTimestamp("create_time");

        Timer timer = new TimerImpl(id, createUser, createTime);

        timer.setName(rst.getString("name"));
        timer.setActionId(DataAccessFactory.getInstance().createUUID(rst.getObject("action_id").toString()));
        timer.setActionParam(rst.getString("action_param"));
        timer.setYear(rst.getString("year"));
        timer.setMonth(rst.getString("month"));
        timer.setWeek(rst.getString("week"));
        timer.setDay(rst.getString("day"));
        timer.setHour(rst.getString("hour"));
        timer.setMinute(rst.getString("minute"));
        timer.setSecond(rst.getString("second"));
        timer.setStart(rst.getBoolean("is_start"));

        Object filterIdObj = rst.getObject("filter_id");
        if(filterIdObj != null)
          timer.setFilterId(DataAccessFactory.getInstance().createUUID(filterIdObj.toString()));

        Object statisticerIdObj = rst.getObject("statisticer_id");
        if(statisticerIdObj != null)
          timer.setStatisticerId(DataAccessFactory.getInstance().createUUID(statisticerIdObj.toString()));

        timer.setRetryAccount(rst.getLong("retry_account"));
        timer.setRetryDelay(rst.getLong("retry_delay"));
        timer.setSendNull(rst.getBoolean("is_send_null"));

        timerSet.add(timer);
      }
    }
    catch(Exception e)
View Full Code Here

Examples of com.sogou.qadev.service.cynthia.bean.impl.TimerImpl

      {
        UUID id = DataAccessFactory.getInstance().createUUID(rst.getObject("id").toString());
        String createUser = rst.getString("create_user");
        Timestamp createTime = rst.getTimestamp("create_time");

        Timer timer = new TimerImpl(id, createUser, createTime);

        timer.setName(rst.getString("name"));
        timer.setActionId(DataAccessFactory.getInstance().createUUID(rst.getObject("action_id").toString()));
        timer.setActionParam(rst.getString("action_param"));
        timer.setYear(rst.getString("year"));
        timer.setMonth(rst.getString("month"));
        timer.setWeek(rst.getString("week"));
        timer.setDay(rst.getString("day"));
        timer.setHour(rst.getString("hour"));
        timer.setMinute(rst.getString("minute"));
        timer.setSecond(rst.getString("second"));
        timer.setStart(rst.getBoolean("is_start"));

        Object filterIdObj = rst.getObject("filter_id");
        if(filterIdObj != null)
          timer.setFilterId(DataAccessFactory.getInstance().createUUID(filterIdObj.toString()));

        Object statisticerIdObj = rst.getObject("statisticer_id");
        if(statisticerIdObj != null)
          timer.setStatisticerId(DataAccessFactory.getInstance().createUUID(statisticerIdObj.toString()));

        timer.setRetryAccount(rst.getLong("retry_account"));
        timer.setRetryDelay(rst.getLong("retry_delay"));
        timer.setSendNull(rst.getBoolean("is_send_null"));

        timerSet.add(timer);
      }
    }
    catch(Exception e)
View Full Code Here

Examples of com.sogou.qadev.service.cynthia.bean.impl.TimerImpl

      {
        UUID id = DataAccessFactory.getInstance().createUUID(rst.getObject("id").toString());
        Timestamp createTime = rst.getTimestamp("create_time");
        String createUser = rst.getString("create_user");

        Timer timer = new TimerImpl(id, createUser, createTime);

        timer.setName(rst.getString("name"));
        timer.setActionId(DataAccessFactory.getInstance().createUUID(rst.getObject("action_id").toString()));
        timer.setActionParam(rst.getString("action_param"));
        timer.setYear(rst.getString("year"));
        timer.setMonth(rst.getString("month"));
        timer.setWeek(rst.getString("week"));
        timer.setDay(rst.getString("day"));
        timer.setHour(rst.getString("hour"));
        timer.setMinute(rst.getString("minute"));
        timer.setSecond(rst.getString("second"));
        timer.setStart(rst.getBoolean("is_start"));

        Object filterIdObj = rst.getObject("filter_id");
        if(filterIdObj != null)
          timer.setFilterId(DataAccessFactory.getInstance().createUUID(filterIdObj.toString()));

        Object statisticerIdObj = rst.getObject("statisticer_id");
        if(statisticerIdObj != null)
          timer.setStatisticerId(DataAccessFactory.getInstance().createUUID(statisticerIdObj.toString()));

        timer.setRetryAccount(rst.getLong("retry_account"));
        timer.setRetryDelay(rst.getLong("retry_delay"));
        timer.setSendNull(rst.getBoolean("is_send_null"));

        timerSet.add(timer);
      }
    }
    catch(Exception e)
View Full Code Here

Examples of com.sogou.qadev.service.cynthia.bean.impl.TimerImpl

      if(rst.next())
      {
        String createUser = rst.getString("create_user");
        Timestamp createTime = rst.getTimestamp("create_time");

        timer = new TimerImpl(timerId, createUser, createTime);
        timer.setName(rst.getString("name"));
        timer.setActionId(DataAccessFactory.getInstance().createUUID(rst.getObject("action_id").toString()));
        timer.setActionParam(rst.getString("action_param"));
        timer.setYear(rst.getString("year"));
        timer.setMonth(rst.getString("month"));
View Full Code Here

Examples of com.sogou.qadev.service.cynthia.bean.impl.TimerImpl

      {
        UUID id = DataAccessFactory.getInstance().createUUID(rst.getObject("id").toString());
        String createUser = rst.getString("create_user");
        Timestamp createTime = rst.getTimestamp("create_time");

        Timer timer = new TimerImpl(id, createUser, createTime);

        timer.setName(rst.getString("name"));
        timer.setActionId(DataAccessFactory.getInstance().createUUID(rst.getObject("action_id").toString()));
        timer.setActionParam(rst.getString("action_param"));
        timer.setYear(rst.getString("year"));
        timer.setMonth(rst.getString("month"));
        timer.setWeek(rst.getString("week"));
        timer.setDay(rst.getString("day"));
        timer.setHour(rst.getString("hour"));
        timer.setMinute(rst.getString("minute"));
        timer.setSecond(rst.getString("second"));
        timer.setStart(rst.getBoolean("is_start"));

        Object filterIdObj = rst.getObject("filter_id");
        if(filterIdObj != null)
          timer.setFilterId(DataAccessFactory.getInstance().createUUID(filterIdObj.toString()));

        Object statisticerIdObj = rst.getObject("statisticer_id");
        if(statisticerIdObj != null)
          timer.setStatisticerId(DataAccessFactory.getInstance().createUUID(statisticerIdObj.toString()));

        timer.setRetryAccount(rst.getLong("retry_account"));
        timer.setRetryDelay(rst.getLong("retry_delay"));
        timer.setSendNull(rst.getBoolean("is_send_null"));

        timerSet.add(timer);
      }
    }
    catch(Exception e)
View Full Code Here

Examples of org.jboss.as.ejb3.timerservice.TimerImpl

     */
    public void removeAllTimers() {
        //cancel all timers for this entity
        for (final Timer timer : getComponent().getTimerService().getTimers()) {
            if (timer instanceof TimerImpl) {
                TimerImpl timerImpl = (TimerImpl) timer;
                if (timerImpl.getPrimaryKey() != null && timerImpl.getPrimaryKey().equals(getPrimaryKey())) {
                    timer.cancel();
                }
            }
        }
    }
View Full Code Here

Examples of org.jboss.as.ejb3.timerservice.TimerImpl

            statement.setString(2, partition);
            resultSet = statement.executeQuery();
            final List<TimerImpl> timers = new ArrayList<TimerImpl>();
            while (resultSet.next()) {
                try {
                    final TimerImpl timerImpl = timerFromResult(resultSet, timerService);
                    if (timerImpl != null) {
                        timers.add(timerImpl);
                    }
                } catch (Exception e) {
                    EjbLogger.ROOT_LOGGER.timerReinstatementFailed(resultSet.getString(2), resultSet.getString(1), e);
View Full Code Here

Examples of org.jboss.as.ejb3.timerservice.TimerImpl

                                    String id = resultSet.getString(1);
                                    if (!existing.remove(id)) {
                                        synchronized (DatabaseTimerPersistence.this) {
                                            knownTimerIds.get(timedObjectId).add(id);
                                        }
                                        final TimerImpl timerImpl = timerFromResult(resultSet, listener.getTimerService());
                                        listener.timerAdded(timerImpl);
                                    }
                                } catch (Exception e) {
                                    EjbLogger.ROOT_LOGGER.timerReinstatementFailed(resultSet.getString(2), resultSet.getString(1), e);
                                }
View Full Code Here

Examples of org.jboss.as.ejb3.timerservice.TimerImpl

            if (status == Status.STATUS_UNKNOWN ||
                    status == Status.STATUS_NO_TRANSACTION) {
                return timerImpl;
            }
            final String key = timerTransactionKey(timerImpl);
            TimerImpl existing = (TimerImpl) transactionSynchronizationRegistry.getValue().getResource(key);
            return existing != null ? existing : timerImpl;
        } catch (SystemException e) {
            throw new RuntimeException(e);
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.