use of com.vip.saturn.job.internal.storage.JobNodeStorage in project Saturn by vipshop.
the class SaturnAutoBasic method doReport.
protected static void doReport(JobConfiguration jobConfiguration) {
JobNodeStorage jobNodeStorage = new JobNodeStorage(regCenter, jobConfiguration);
jobNodeStorage.fillJobNodeIfNullOrOverwrite("control/report", System.currentTimeMillis());
}
use of com.vip.saturn.job.internal.storage.JobNodeStorage in project Saturn by vipshop.
the class SaturnAutoBasic method removeJobNode.
protected static void removeJobNode(JobConfiguration jobConfiguration, String node) {
JobNodeStorage jobNodeStorage = new JobNodeStorage(regCenter, jobConfiguration);
jobNodeStorage.removeJobNodeIfExisted(node);
}
use of com.vip.saturn.job.internal.storage.JobNodeStorage in project Saturn by vipshop.
the class SaturnAutoBasic method addJob.
protected static void addJob(JobConfiguration jobConfiguration) {
JobNodeStorage jobNodeStorage = new JobNodeStorage(regCenter, jobConfiguration);
jobNodeStorage.fillJobNodeIfNullOrOverwrite(ConfigurationNode.JOB_TYPE, jobConfiguration.getJobType());
jobNodeStorage.fillJobNodeIfNullOrOverwrite(ConfigurationNode.SHARDING_TOTAL_COUNT, jobConfiguration.getShardingTotalCount());
jobNodeStorage.fillJobNodeIfNullOrOverwrite(ConfigurationNode.SHARDING_ITEM_PARAMETERS, jobConfiguration.getShardingItemParameters());
jobNodeStorage.fillJobNodeIfNullOrOverwrite(ConfigurationNode.JOB_PARAMETER, jobConfiguration.getJobParameter());
jobNodeStorage.fillJobNodeIfNullOrOverwrite(ConfigurationNode.TIMEZONE, jobConfiguration.getTimeZone());
jobNodeStorage.fillJobNodeIfNullOrOverwrite(ConfigurationNode.CRON, jobConfiguration.getCron());
jobNodeStorage.fillJobNodeIfNullOrOverwrite(ConfigurationNode.PREFER_LIST, jobConfiguration.getPreferList());
jobNodeStorage.fillJobNodeIfNullOrOverwrite(ConfigurationNode.PAUSE_PERIOD_DATE, jobConfiguration.getPausePeriodDate());
jobNodeStorage.fillJobNodeIfNullOrOverwrite(ConfigurationNode.PAUSE_PERIOD_TIME, jobConfiguration.getPausePeriodTime());
jobNodeStorage.fillJobNodeIfNullOrOverwrite(ConfigurationNode.PROCESS_COUNT_INTERVAL_SECONDS, jobConfiguration.getProcessCountIntervalSeconds());
jobNodeStorage.fillJobNodeIfNullOrOverwrite(ConfigurationNode.FAILOVER, jobConfiguration.isFailover());
jobNodeStorage.fillJobNodeIfNullOrOverwrite(ConfigurationNode.LOAD_LEVEL, jobConfiguration.getLoadLevel());
jobNodeStorage.fillJobNodeIfNullOrOverwrite(ConfigurationNode.DESCRIPTION, jobConfiguration.getDescription());
jobNodeStorage.fillJobNodeIfNullOrOverwrite(ConfigurationNode.TIMEOUTSECONDS, jobConfiguration.getTimeoutSeconds());
jobNodeStorage.fillJobNodeIfNullOrOverwrite(ConfigurationNode.SHOW_NORMAL_LOG, jobConfiguration.isShowNormalLog());
jobNodeStorage.fillJobNodeIfNullOrOverwrite(ConfigurationNode.QUEUE_NAME, jobConfiguration.getQueueName());
jobNodeStorage.fillJobNodeIfNullOrOverwrite(ConfigurationNode.CHANNEL_NAME, jobConfiguration.getChannelName());
jobNodeStorage.fillJobNodeIfNullOrOverwrite(ConfigurationNode.USE_DISPREFER_LIST, jobConfiguration.isUseDispreferList());
jobNodeStorage.fillJobNodeIfNullOrOverwrite(ConfigurationNode.LOCAL_MODE, jobConfiguration.isLocalMode());
jobNodeStorage.fillJobNodeIfNullOrOverwrite(ConfigurationNode.USE_SERIAL, jobConfiguration.isUseSerial());
jobNodeStorage.fillJobNodeIfNullOrOverwrite(ConfigurationNode.ENABLED, jobConfiguration.isEnabled());
jobNodeStorage.fillJobNodeIfNullOrOverwrite(ConfigurationNode.JOB_CLASS, jobConfiguration.getJobClass());
}
use of com.vip.saturn.job.internal.storage.JobNodeStorage in project Saturn by vipshop.
the class SaturnAutoBasic method updateJobNode.
protected static void updateJobNode(JobConfiguration jobConfiguration, String node, String value) {
JobNodeStorage jobNodeStorage = new JobNodeStorage(regCenter, jobConfiguration);
jobNodeStorage.updateJobNode(node, value);
}
use of com.vip.saturn.job.internal.storage.JobNodeStorage in project Saturn by vipshop.
the class SaturnAutoBasic method configJob.
protected static void configJob(String jobName, String configPath, Object value) {
JobConfiguration jobConfiguration = new JobConfiguration(jobName);
JobNodeStorage jobNodeStorage = new JobNodeStorage(regCenter, jobConfiguration);
jobNodeStorage.fillJobNodeIfNullOrOverwrite(configPath, value);
}
Aggregations