Package io.jmix.quartz.service
Class RunningJobsCache
java.lang.Object
io.jmix.quartz.service.RunningJobsCache
Currently running jobs store
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringprotected org.springframework.cache.CacheManagerprotected CacheOperationsprotected org.springframework.cache.Cache -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSet<org.quartz.TriggerKey>getRunningTriggers(org.quartz.JobKey key) protected voidinit()voidinvalidate(org.quartz.JobKey jobKey) Remove all running triggers for provided job from cachevoidinvalidate(org.quartz.JobKey jobKey, org.quartz.TriggerKey triggerKey) voidInvalidate entire cachebooleanisJobRunning(org.quartz.JobKey jobKey) Checks if job has at least one running triggervoidput(org.quartz.JobKey jobKey, org.quartz.TriggerKey triggerKey)
-
Field Details
-
jobDetails
protected org.springframework.cache.Cache jobDetails -
cacheManager
@Autowired protected org.springframework.cache.CacheManager cacheManager -
cacheOperations
-
CACHE_NAME
- See Also:
-
-
Constructor Details
-
RunningJobsCache
public RunningJobsCache()
-
-
Method Details
-
init
@PostConstruct protected void init() -
isJobRunning
public boolean isJobRunning(org.quartz.JobKey jobKey) Checks if job has at least one running trigger- Parameters:
jobKey- Job key- Returns:
- true if there is running trigger, false otherwise.
-
getRunningTriggers
-
put
public void put(org.quartz.JobKey jobKey, org.quartz.TriggerKey triggerKey) -
invalidate
public void invalidate(org.quartz.JobKey jobKey, org.quartz.TriggerKey triggerKey) -
invalidate
public void invalidate(org.quartz.JobKey jobKey) Remove all running triggers for provided job from cache- Parameters:
jobKey- Job key
-
invalidateAll
public void invalidateAll()Invalidate entire cache
-