@Override public List<QuartzScheduleJobBO> listQuartzConfig(Integer sysType) { if (sysType.intValue() == SysTypeEnum.server.getVal().intValue()) { return getAllHostSchedule(); } else if (sysType.intValue() == SysTypeEnum.Oracle.getVal().intValue()) { return getAllDbSchedule(SysTypeEnum.Oracle.getVal()); } else if (sysType.intValue() == SysTypeEnum.MySQL.getVal().intValue()) { return getAllDbSchedule(SysTypeEnum.MySQL.getVal()); } else if (sysType.intValue() == SysTypeEnum.KEEPALIVED.getVal().intValue()) { return getAllDbSchedule(SysTypeEnum.KEEPALIVED.getVal()); } return Collections.EMPTY_LIST; }
/** * MySQL的调度任务 * * @param serverId * @return */ private List<QuartzScheduleJobBO> getKeepAlivedSchedule(String serverId) { List<QuartzScheduleJobBO> jobs = new ArrayList<QuartzScheduleJobBO>(); List<DbConfigDomain> dbList = dbConfigDAO.listDbConfigByServerId(serverId, SysTypeEnum.KEEPALIVED.getVal().toString()); for (DbConfigDomain domain : dbList) { List<DeamonScheduleconfigDomain> list = deamonScheduleconfigDAO.listDeamonScheduleconfigByMonitorId( domain.getDbId(), SysTypeEnum.KEEPALIVED.getVal()); if (list != null && list.size() > 0) { for (DeamonScheduleconfigDomain scheduleDomain : list) { QuartzScheduleJobBO bo = convertConfigToScheduleJob(scheduleDomain); if (bo == null) continue; jobs.add(bo); } } } return jobs; }
@SuppressWarnings("unchecked") @Override public List<QuartzScheduleJobBO> listQuartzConfig(String serverId, Integer sysType) { if (sysType.intValue() == SysTypeEnum.server.getVal().intValue()) { return getHostSchedule(serverId); } else if (sysType.intValue() == SysTypeEnum.Oracle.getVal().intValue()) { return getOracleSchedule(serverId); } else if (sysType.intValue() == SysTypeEnum.MySQL.getVal().intValue()) { return getMySQLSchedule(serverId); } else if (sysType.intValue() == SysTypeEnum.KEEPALIVED.getVal().intValue()) { return getKeepAlivedSchedule(serverId); } return Collections.EMPTY_LIST; }