rename schedule interface methods
This commit is contained in:
parent
321790f6bf
commit
37eef4e3e4
|
@ -317,7 +317,7 @@ public class BulkDataExportSvcImpl implements IBulkDataExportSvc {
|
|||
ScheduledJobDefinition jobDetail = new ScheduledJobDefinition();
|
||||
jobDetail.setId(this.getClass().getName());
|
||||
jobDetail.setJobClass(Job.class);
|
||||
mySchedulerService.scheduleFixedDelayClustered(JOB_INTERVAL_MILLIS, jobDetail);
|
||||
mySchedulerService.scheduleClusteredJob(JOB_INTERVAL_MILLIS, jobDetail);
|
||||
}
|
||||
|
||||
public static class Job implements HapiJob {
|
||||
|
|
|
@ -172,12 +172,12 @@ public abstract class BaseSchedulerServiceImpl implements ISchedulerService, Sma
|
|||
}
|
||||
|
||||
@Override
|
||||
public void scheduleFixedDelayLocal(long theIntervalMillis, ScheduledJobDefinition theJobDefinition) {
|
||||
public void scheduleLocalJob(long theIntervalMillis, ScheduledJobDefinition theJobDefinition) {
|
||||
myLocalScheduler.scheduleFixedDelay(theIntervalMillis, theJobDefinition);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void scheduleFixedDelayClustered(long theIntervalMillis, ScheduledJobDefinition theJobDefinition) {
|
||||
public void scheduleClusteredJob(long theIntervalMillis, ScheduledJobDefinition theJobDefinition) {
|
||||
myClusteredScheduler.scheduleFixedDelay(theIntervalMillis, theJobDefinition);
|
||||
}
|
||||
|
||||
|
|
|
@ -62,7 +62,7 @@ public class StaleSearchDeletingSvcImpl implements IStaleSearchDeletingSvc {
|
|||
ScheduledJobDefinition jobDetail = new ScheduledJobDefinition();
|
||||
jobDetail.setId(StaleSearchDeletingSvcImpl.class.getName());
|
||||
jobDetail.setJobClass(StaleSearchDeletingSvcImpl.SubmitJob.class);
|
||||
mySchedulerService.scheduleFixedDelayClustered(DEFAULT_CUTOFF_SLACK, jobDetail);
|
||||
mySchedulerService.scheduleClusteredJob(DEFAULT_CUTOFF_SLACK, jobDetail);
|
||||
}
|
||||
|
||||
@Transactional(propagation = Propagation.NEVER)
|
||||
|
|
|
@ -55,7 +55,7 @@ public abstract class BaseSearchCacheSvcImpl implements ISearchCacheSvc {
|
|||
ScheduledJobDefinition jobDetail = new ScheduledJobDefinition();
|
||||
jobDetail.setId(BaseSearchCacheSvcImpl.class.getName());
|
||||
jobDetail.setJobClass(BaseSearchCacheSvcImpl.SubmitJob.class);
|
||||
mySchedulerService.scheduleFixedDelayLocal(10 * DateUtils.MILLIS_PER_SECOND, jobDetail);
|
||||
mySchedulerService.scheduleLocalJob(10 * DateUtils.MILLIS_PER_SECOND, jobDetail);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -192,7 +192,7 @@ public class ResourceReindexingSvcImpl implements IResourceReindexingSvc {
|
|||
ScheduledJobDefinition jobDetail = new ScheduledJobDefinition();
|
||||
jobDetail.setId(ResourceReindexingSvcImpl.class.getName());
|
||||
jobDetail.setJobClass(ResourceReindexingSvcImpl.SubmitJob.class);
|
||||
mySchedulerService.scheduleFixedDelayClustered(10 * DateUtils.MILLIS_PER_SECOND, jobDetail);
|
||||
mySchedulerService.scheduleClusteredJob(10 * DateUtils.MILLIS_PER_SECOND, jobDetail);
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
|
|
|
@ -110,7 +110,7 @@ public class CacheWarmingSvcImpl implements ICacheWarmingSvc {
|
|||
ScheduledJobDefinition jobDetail = new ScheduledJobDefinition();
|
||||
jobDetail.setId(this.getClass().getName());
|
||||
jobDetail.setJobClass(Job.class);
|
||||
mySchedulerService.scheduleFixedDelayClustered(JOB_INTERVAL_MILLIS, jobDetail);
|
||||
mySchedulerService.scheduleClusteredJob(JOB_INTERVAL_MILLIS, jobDetail);
|
||||
}
|
||||
|
||||
public static class Job implements HapiJob {
|
||||
|
|
|
@ -387,7 +387,7 @@ public class SubscriptionTriggeringSvcImpl implements ISubscriptionTriggeringSvc
|
|||
ScheduledJobDefinition jobDetail = new ScheduledJobDefinition();
|
||||
jobDetail.setId(this.getClass().getName());
|
||||
jobDetail.setJobClass(Job.class);
|
||||
mySchedulerService.scheduleFixedDelayLocal(JOB_INTERVAL_MILLIS, jobDetail);
|
||||
mySchedulerService.scheduleLocalJob(JOB_INTERVAL_MILLIS, jobDetail);
|
||||
}
|
||||
|
||||
public static class Job implements HapiJob {
|
||||
|
|
|
@ -1309,7 +1309,7 @@ public abstract class BaseTermReadSvcImpl implements ITermReadSvc, ApplicationCo
|
|||
ScheduledJobDefinition vsJobDefinition = new ScheduledJobDefinition();
|
||||
vsJobDefinition.setId(BaseTermReadSvcImpl.class.getName() + "_preExpandValueSets");
|
||||
vsJobDefinition.setJobClass(PreExpandValueSetsJob.class);
|
||||
mySchedulerService.scheduleFixedDelayClustered(10 * DateUtils.MILLIS_PER_MINUTE, vsJobDefinition);
|
||||
mySchedulerService.scheduleClusteredJob(10 * DateUtils.MILLIS_PER_MINUTE, vsJobDefinition);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -267,7 +267,7 @@ public class TermDeferredStorageSvcImpl implements ITermDeferredStorageSvc {
|
|||
ScheduledJobDefinition jobDefinition = new ScheduledJobDefinition();
|
||||
jobDefinition.setId(this.getClass().getName());
|
||||
jobDefinition.setJobClass(Job.class);
|
||||
mySchedulerService.scheduleFixedDelayLocal(JOB_INTERVAL_MILLIS, jobDefinition);
|
||||
mySchedulerService.scheduleLocalJob(JOB_INTERVAL_MILLIS, jobDefinition);
|
||||
}
|
||||
|
||||
public static class Job implements HapiJob {
|
||||
|
|
|
@ -157,7 +157,7 @@ public class TermReindexingSvcImpl implements ITermReindexingSvc {
|
|||
ScheduledJobDefinition jobDefinition = new ScheduledJobDefinition();
|
||||
jobDefinition.setId(this.getClass().getName());
|
||||
jobDefinition.setJobClass(Job.class);
|
||||
mySchedulerService.scheduleFixedDelayLocal(JOB_INTERVAL_MILLIS, jobDefinition);
|
||||
mySchedulerService.scheduleLocalJob(JOB_INTERVAL_MILLIS, jobDefinition);
|
||||
}
|
||||
|
||||
public static class Job implements HapiJob {
|
||||
|
|
|
@ -96,7 +96,7 @@ public class ResourceCountCache {
|
|||
ScheduledJobDefinition jobDetail = new ScheduledJobDefinition();
|
||||
jobDetail.setId(ResourceCountCache.class.getName());
|
||||
jobDetail.setJobClass(ResourceCountCache.SubmitJob.class);
|
||||
mySchedulerService.scheduleFixedDelayLocal(10 * DateUtils.MILLIS_PER_MINUTE, jobDetail);
|
||||
mySchedulerService.scheduleLocalJob(10 * DateUtils.MILLIS_PER_MINUTE, jobDetail);
|
||||
}
|
||||
|
||||
public static class SubmitJob implements Job {
|
||||
|
|
|
@ -51,7 +51,7 @@ public class SchedulerServiceImplTest {
|
|||
.setId(CountingJob.class.getName())
|
||||
.setJobClass(CountingJob.class);
|
||||
|
||||
mySvc.scheduleFixedDelayLocal(100, def);
|
||||
mySvc.scheduleLocalJob(100, def);
|
||||
|
||||
sleepAtLeast(1000);
|
||||
|
||||
|
@ -73,7 +73,7 @@ public class SchedulerServiceImplTest {
|
|||
svc.create();
|
||||
svc.start();
|
||||
|
||||
mySvc.scheduleFixedDelayLocal(100, def);
|
||||
mySvc.scheduleLocalJob(100, def);
|
||||
|
||||
sleepAtLeast(1000);
|
||||
|
||||
|
@ -91,7 +91,7 @@ public class SchedulerServiceImplTest {
|
|||
.setJobClass(CountingJob.class);
|
||||
ourTaskDelay = 500;
|
||||
|
||||
mySvc.scheduleFixedDelayLocal(100, def);
|
||||
mySvc.scheduleLocalJob(100, def);
|
||||
|
||||
sleepAtLeast(1000);
|
||||
|
||||
|
@ -109,7 +109,7 @@ public class SchedulerServiceImplTest {
|
|||
.setJobClass(CountingIntervalJob.class);
|
||||
ourTaskDelay = 500;
|
||||
|
||||
mySvc.scheduleFixedDelayLocal(100, def);
|
||||
mySvc.scheduleLocalJob(100, def);
|
||||
|
||||
sleepAtLeast(2000);
|
||||
|
||||
|
|
|
@ -728,7 +728,7 @@ public class SearchParamRegistryImpl implements ISearchParamRegistry {
|
|||
ScheduledJobDefinition jobDetail = new ScheduledJobDefinition();
|
||||
jobDetail.setId(SearchParamRegistryImpl.class.getName());
|
||||
jobDetail.setJobClass(SubmitJob.class);
|
||||
mySchedulerService.scheduleFixedDelayLocal(10 * DateUtils.MILLIS_PER_SECOND, jobDetail);
|
||||
mySchedulerService.scheduleLocalJob(10 * DateUtils.MILLIS_PER_SECOND, jobDetail);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -92,7 +92,7 @@ public class SubscriptionLoader {
|
|||
ScheduledJobDefinition jobDetail = new ScheduledJobDefinition();
|
||||
jobDetail.setId(this.getClass().getName());
|
||||
jobDetail.setJobClass(Job.class);
|
||||
mySchedulerService.scheduleFixedDelayLocal(JOB_INTERVAL_MILLIS, jobDetail);
|
||||
mySchedulerService.scheduleLocalJob(JOB_INTERVAL_MILLIS, jobDetail);
|
||||
}
|
||||
|
||||
public static class Job implements HapiJob {
|
||||
|
|
|
@ -70,7 +70,7 @@ public class AnalyticsInterceptor extends InterceptorAdapter {
|
|||
ScheduledJobDefinition jobDetail = new ScheduledJobDefinition();
|
||||
jobDetail.setId(getClass().getName());
|
||||
jobDetail.setJobClass(SubmitJob.class);
|
||||
mySchedulerService.scheduleFixedDelayLocal(5000, jobDetail);
|
||||
mySchedulerService.scheduleLocalJob(5000, jobDetail);
|
||||
}
|
||||
|
||||
@PreDestroy
|
||||
|
|
|
@ -35,14 +35,14 @@ public interface ISchedulerService {
|
|||
* @param theIntervalMillis How many milliseconds between passes should this job run
|
||||
* @param theJobDefinition The Job to fire
|
||||
*/
|
||||
void scheduleFixedDelayLocal(long theIntervalMillis, ScheduledJobDefinition theJobDefinition);
|
||||
void scheduleLocalJob(long theIntervalMillis, ScheduledJobDefinition theJobDefinition);
|
||||
|
||||
/**
|
||||
* This task will execute locally (and should execute on all nodes of the cluster if there is a cluster)
|
||||
* @param theIntervalMillis How many milliseconds between passes should this job run
|
||||
* @param theJobDefinition The Job to fire
|
||||
*/
|
||||
void scheduleFixedDelayClustered(long theIntervalMillis, ScheduledJobDefinition theJobDefinition);
|
||||
void scheduleClusteredJob(long theIntervalMillis, ScheduledJobDefinition theJobDefinition);
|
||||
|
||||
boolean isStopping();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue