Package jenkins.model
Interface IExecutor
- All Known Implementing Classes:
- Executor,- OneOffExecutor
@Restricted(org.kohsuke.accmod.restrictions.Beta.class)
public interface IExecutor
Interface for an executor that can be displayed in the executors widget.
- Since:
- 2.480
- 
Method SummaryModifier and TypeMethodDescriptionReturns the currentWorkUnit(ofthe current executable) that this executor is running.longGets the elapsed time since the build has started.Computes a human-readable text that shows the expected remaining time until the build completes.intGets the executor number that uniquely identifies it among otherIExecutors for the same computer.getOwner()default ITaskintReturns the progress of the current build in the number between 0-100.default StringGets the string that says how long since this build has started.booleanChecks if the current user has a permission to stop this build.booleanisIdle()Returns true if thisIExecutoris ready for action.booleanReturns true if the current build is likely stuck.
- 
Method Details- 
isIdleboolean isIdle()Returns true if thisIExecutoris ready for action.
- 
getOwnerIComputer getOwner()- Returns:
- the IComputerthat this executor belongs to.
 
- 
getCurrentExecutable- Returns:
- the current executable, if any.
 
- 
getCurrentWorkUnitReturns the currentWorkUnit(ofthe current executable) that this executor is running.- Returns:
- null if the executor is idle.
 
- 
getDisplayNameString getDisplayName()- Returns:
- the current display name of the executor. Usually the name of the executable.
 
- 
getParentTask- Returns:
- a reference to the parent task of the current executable, if any.
 
- 
hasStopPermissionboolean hasStopPermission()Checks if the current user has a permission to stop this build.
- 
getNumberint getNumber()Gets the executor number that uniquely identifies it among otherIExecutors for the same computer.- Returns:
- a sequential number starting from 0.
 
- 
getElapsedTimelong getElapsedTime()Gets the elapsed time since the build has started.- Returns:
- the number of milliseconds since the build has started.
 
- 
getTimestampStringGets the string that says how long since this build has started.- Returns:
- string like "3 minutes" "1 day" etc.
 
- 
getEstimatedRemainingTimeString getEstimatedRemainingTime()Computes a human-readable text that shows the expected remaining time until the build completes.
- 
isLikelyStuckboolean isLikelyStuck()Returns true if the current build is likely stuck.This is a heuristics based approach, but if the build is suspiciously taking for a long time, this method returns true. 
- 
getProgressint getProgress()Returns the progress of the current build in the number between 0-100.- Returns:
- -1 if it's impossible to estimate the progress.
 
 
-