Class QueueJob
java.lang.Object
org.jenkinsci.plugins.jqsmonitoring.buildqueue.QueueJob
- All Implemented Interfaces:
Comparable<QueueJob>
Stores attributes and functions of a queue job. Implements the interface
Comparable for sorting the jobs currently waiting in the queue according to
their wait time.
- Author:
- yboev
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintImplementation of the comparing method.booleangetApi()REST APIReturns why the job is waiting in the queue.getColor()Color to be used for this job.getIcon()Returns the icon for this queue job.getName()Returns ID of the waiting job.Returns the status of this queue job.getTime()Color Returns the time which a job has spend in the queue waiting as a formate String.getUrl()Returns the url for this queue job.inthashCode()
-
Constructor Details
-
QueueJob
Constructor.- Parameters:
item- the job(item) waiting in the queuecurrentTime- the current time on which all items have been retrieved
-
-
Method Details
-
getApi
REST API- Returns:
- the api.
-
getStatus
Returns the status of this queue job. Options: "ok", "blocked", "stuck"- Returns:
- the status
-
getName
Returns ID of the waiting job.- Returns:
- the ID
-
getTime
Color Returns the time which a job has spend in the queue waiting as a formate String.- Returns:
- the formated String
-
getCauseOfBlockage
Returns why the job is waiting in the queue. -
getColor
Color to be used for this job.- Returns:
- the color as String
-
compareTo
Implementation of the comparing method.- Specified by:
compareToin interfaceComparable<QueueJob>
-
equals
-
hashCode
public int hashCode() -
getIcon
Returns the icon for this queue job.- Returns:
- address of the icon
-
getUrl
Returns the url for this queue job.- Returns:
- the url as string.
-