Package io.jmix.quartz.service
Class RunningJobsCache
java.lang.Object
io.jmix.quartz.service.RunningJobsCache
Currently running jobs store
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
protected org.springframework.cache.CacheManager
protected CacheOperations
protected org.springframework.cache.Cache
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionSet<org.quartz.TriggerKey>
getRunningTriggers
(org.quartz.JobKey key) protected void
init()
void
invalidate
(org.quartz.JobKey jobKey) Remove all running triggers for provided job from cachevoid
invalidate
(org.quartz.JobKey jobKey, org.quartz.TriggerKey triggerKey) void
Invalidate entire cacheboolean
isJobRunning
(org.quartz.JobKey jobKey) Checks if job has at least one running triggervoid
put
(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
-