Package tenapull.run
Class Job.Accessor
java.lang.Object
tenapull.run.Job.Accessor
- Enclosing class:
- Job
public final class Job.Accessor
extends java.lang.Object
The "accessor" allows for quasi-public access to private methods of Job, which should only
be accessible to the main thread and to worker threads as necessary. By restricting access
to the job's accessor, we can control who has access to these methods, making them
effectively private for all but select classes.
-
Method Summary
Modifier and Type Method Description Job
getCurrentJob()
Gets the job which this accessor representsjava.util.Set<Job>
getNewJobs()
Gets new jobs.java.lang.Thread
getRunThread()
Gets run thread for the job represented by this accessorJob.Stage
getStage()
Gets stage the job is atlong
getTryAtTime()
Gets try at time for the job represented by this accessorboolean
hasException()
Gets whether the job had an exception during its last run.boolean
isFailed()
Whether the job has failed
-
Method Details
-
getNewJobs
Gets new jobs.- Returns:
- the new jobs
-
getRunThread
public final java.lang.Thread getRunThread()Gets run thread for the job represented by this accessor- Returns:
- the run thread
-
isFailed
public boolean isFailed()Whether the job has failed- Returns:
- failure state
-
getStage
Gets stage the job is at- Returns:
- the stage
-
hasException
public boolean hasException()Gets whether the job had an exception during its last run. Not necessarily an indication of failure.- Returns:
- the boolean
-
getTryAtTime
public long getTryAtTime()Gets try at time for the job represented by this accessor- Returns:
- the try at time
-
getCurrentJob
Gets the job which this accessor represents- Returns:
- the current job
-