Package uk.gov.gchq.gaffer.jobtracker
Class JobTracker
- java.lang.Object
-
- uk.gov.gchq.gaffer.cache.Cache<String,JobDetail>
-
- uk.gov.gchq.gaffer.jobtracker.JobTracker
-
-
Field Summary
Fields Modifier and Type Field Description static String
JOB_TRACKER_CACHE_SERVICE_NAME
-
Constructor Summary
Constructors Constructor Description JobTracker(String suffixJobTrackerCacheName)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addOrUpdateJob(JobDetail jobDetail, User user)
Add or update the job details relating to a job in the job tracker cache.Iterable<JobDetail>
getAllJobs(User user)
Get all jobs from the job tracker cache.Iterable<JobDetail>
getAllScheduledJobs()
Get all scheduled jobs from the job tracker cache.static String
getCacheNameFrom(String suffixJobTrackerCacheName)
JobDetail
getJob(String jobId, User user)
Get the details of a specific job.String
getSuffixCacheName()
-
Methods inherited from class uk.gov.gchq.gaffer.cache.Cache
clearCache, contains, deleteFromCache, getAllKeys, getCache, getCacheName, getCacheNameFrom, getFromCache, getSuffixCacheNameWithoutPrefix
-
-
-
-
Field Detail
-
JOB_TRACKER_CACHE_SERVICE_NAME
public static final String JOB_TRACKER_CACHE_SERVICE_NAME
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
JobTracker
public JobTracker(String suffixJobTrackerCacheName)
-
-
Method Detail
-
getSuffixCacheName
public String getSuffixCacheName()
-
addOrUpdateJob
public void addOrUpdateJob(JobDetail jobDetail, User user)
Add or update the job details relating to a job in the job tracker cache.- Parameters:
jobDetail
- the job details to updateuser
- the user making the request
-
getJob
public JobDetail getJob(String jobId, User user)
Get the details of a specific job.- Parameters:
jobId
- the ID of the job to lookupuser
- the user making the request to the job tracker- Returns:
- the
JobDetail
object for the requested job
-
getAllJobs
public Iterable<JobDetail> getAllJobs(User user)
Get all jobs from the job tracker cache.- Parameters:
user
- the user making the request to the job tracker- Returns:
- a
Iterable
containing all of the job details
-
-