@Test public void test_A_isInPausePeriodTime() throws Exception { JobConfiguration jobConfiguration = new JobConfiguration(""); jobConfiguration.setPausePeriodTime("11:30-12:00"); jobConfiguration.setTimeZone(TimeZone.getDefault().getID()); ZookeeperRegistryCenter zookeeperRegistryCenter = new ZookeeperRegistryCenter(new ZookeeperConfiguration()); zookeeperRegistryCenter.setExecutorName("haha"); ConfigurationService configurationService = new ConfigurationService( new JobScheduler(zookeeperRegistryCenter, jobConfiguration)); try { Calendar calendar = Calendar.getInstance(); calendar.set(2016, 8, 12, 11, 40); boolean inPausePeriod = configurationService.isInPausePeriod(calendar.getTime()); assertThat(inPausePeriod).isTrue(); } finally { JobRegistry.clearExecutor(zookeeperRegistryCenter.getExecutorName()); } }
public boolean isInPausePeriod() { return isInPausePeriod(new Date()); }
ConfigurationService extends AbstractSaturnService { public boolean isInPausePeriod() { return isInPausePeriod(new Date()); } }
ConfigurationService extends AbstractSaturnService { public boolean isInPausePeriod() { return isInPausePeriod(new Date()); } ConfigurationService(JobScheduler jobScheduler); }
ConfigurationService extends AbstractSaturnService { public boolean isInPausePeriod() { return isInPausePeriod(new Date()); } ConfigurationService(JobScheduler jobScheduler); @Override void start(); @Override void shutdown(); void notifyJobEnabledOrNot(); void notifyJobEnabledIfNecessary(); void notifyJobDisabled(); int getShardingTotalCount(); boolean isLocalMode(); Map<Integer, String> getShardingItemParameters(); String getJobParameter(); String getTimeZoneStr(); TimeZone getTimeZone(); String getCron(); int getProcessCountIntervalSeconds(); boolean isInPausePeriod(); boolean isInPausePeriod(Date date); boolean isFailover(); boolean isJobEnabled(); boolean isEnabledReport(); int getTimeoutSeconds(); boolean showNormalLog(); Map<String, String> getCustomContext(); JobType getJobType(); String getQueueName(); String getChannelName(); List<String> getPreferList(); boolean isUseDispreferList(); List<String> getDownStream(); }
ConfigurationService extends AbstractSaturnService { public boolean isInPausePeriod() { return isInPausePeriod(new Date()); } ConfigurationService(JobScheduler jobScheduler); @Override void start(); @Override void shutdown(); void notifyJobEnabledOrNot(); void notifyJobEnabledIfNecessary(); void notifyJobDisabled(); int getShardingTotalCount(); boolean isLocalMode(); Map<Integer, String> getShardingItemParameters(); String getJobParameter(); String getTimeZoneStr(); TimeZone getTimeZone(); String getCron(); int getProcessCountIntervalSeconds(); boolean isInPausePeriod(); boolean isInPausePeriod(Date date); boolean isFailover(); boolean isJobEnabled(); boolean isEnabledReport(); int getTimeoutSeconds(); boolean showNormalLog(); Map<String, String> getCustomContext(); JobType getJobType(); String getQueueName(); String getChannelName(); List<String> getPreferList(); boolean isUseDispreferList(); List<String> getDownStream();  }