/** * Estimate of how long will it take to execute this executable. * Measured in milliseconds. * * @return -1 if it's impossible to estimate; default, {@link SubTask#getEstimatedDuration} * @since 1.383 */ default long getEstimatedDuration() { return Executables.getParentOf(this).getEstimatedDuration(); }
/** * Checks if the current user has a permission to stop this build. */ public boolean hasStopPermission() { lock.readLock().lock(); try { return executable != null && getParentOf(executable).getOwnerTask().hasAbortPermission(); } finally { lock.readLock().unlock(); } }
/** * Stops the current build. * * @since 1.489 */ @RequirePOST public HttpResponse doStop() { lock.writeLock().lock(); // need write lock as interrupt will change the field try { if (executable != null) { getParentOf(executable).getOwnerTask().checkAbortPermission(); interrupt(); } } finally { lock.writeLock().unlock(); } return HttpResponses.forwardToPreviousPage(); }
final WorkUnit workUnit = e.getCurrentWorkUnit(); final Executable executable = workUnit != null ? workUnit.getExecutable() : null; final SubTask subtask = executable != null ? getParentOf(executable) : null;
/** * Estimate of how long will it take to execute this executable. * Measured in milliseconds. * * @return -1 if it's impossible to estimate; default, {@link SubTask#getEstimatedDuration} * @since 1.383 */ default long getEstimatedDuration() { return Executables.getParentOf(this).getEstimatedDuration(); }
/** * Checks if the current user has a permission to stop this build. */ public boolean hasStopPermission() { lock.readLock().lock(); try { return executable != null && getParentOf(executable).getOwnerTask().hasAbortPermission(); } finally { lock.readLock().unlock(); } }
/** * Checks if the current user has a permission to stop this build. */ public boolean hasStopPermission() { Queue.Executable e = executable; return e!=null && Tasks.getOwnerTaskOf(getParentOf(e)).hasAbortPermission(); }
/** * Checks if the current user has a permission to stop this build. */ public boolean hasStopPermission() { Queue.Executable e = executable; return e != null && Tasks.getOwnerTaskOf(getParentOf(e)).hasAbortPermission(); }
/** * Checks if the current user has a permission to stop this build. */ public boolean hasStopPermission() { Queue.Executable e = executable; return e!=null && Tasks.getOwnerTaskOf(getParentOf(e)).hasAbortPermission(); }
/** * Checks if the current user has a permission to stop this build. */ public boolean hasStopPermission() { Queue.Executable e = executable; return e!=null && Tasks.getOwnerTaskOf(getParentOf(e)).hasAbortPermission(); }
/** * Stops the current build. * * @since 1.489 */ @RequirePOST public HttpResponse doStop() { lock.writeLock().lock(); // need write lock as interrupt will change the field try { if (executable != null) { getParentOf(executable).getOwnerTask().checkAbortPermission(); interrupt(); } } finally { lock.writeLock().unlock(); } return HttpResponses.forwardToPreviousPage(); }
/** * Stops the current build. */ public void doStop( StaplerRequest req, StaplerResponse rsp ) throws IOException, ServletException { Queue.Executable e = executable; if(e!=null) { Tasks.getOwnerTaskOf(getParentOf(e)).checkAbortPermission(); interrupt(); } rsp.forwardToPreviousPage(req); }
/** * Stops the current build. */ public void doStop( StaplerRequest req, StaplerResponse rsp ) throws IOException, ServletException { Queue.Executable e = executable; if(e!=null) { Tasks.getOwnerTaskOf(getParentOf(e)).checkAbortPermission(); interrupt(); } rsp.forwardToPreviousPage(req); }
/** * Stops the current build. */ public void doStop(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException { Queue.Executable e = executable; if (e != null) { Tasks.getOwnerTaskOf(getParentOf(e)).checkAbortPermission(); interrupt(); } rsp.forwardToPreviousPage(req); }
/** * Stops the current build. */ public void doStop( StaplerRequest req, StaplerResponse rsp ) throws IOException, ServletException { Queue.Executable e = executable; if(e!=null) { Tasks.getOwnerTaskOf(getParentOf(e)).checkAbortPermission(); interrupt(); } rsp.forwardToPreviousPage(req); }
final WorkUnit workUnit = e.getCurrentWorkUnit(); final Executable executable = workUnit != null ? workUnit.getExecutable() : null; final SubTask subtask = executable != null ? getParentOf(executable) : null;
Queue.Executable executable = workUnit.getExecutable(); if (executable != null) { Item item = ItemDeletion.getItemOf(getParentOf(executable)); if (item != null) { while (item != null) {
WorkUnit workUnit = e.getCurrentWorkUnit(); if (workUnit != null) { Item item = ItemDeletion.getItemOf(getParentOf(workUnit.getExecutable())); if (item != null) { while (item != null) { WorkUnit workUnit = e.getCurrentWorkUnit(); if (workUnit != null) { Item item = ItemDeletion.getItemOf(getParentOf(workUnit.getExecutable())); if (item != null) { while (item != null) {