public abstract class ScheduleResult extends Object
Queue.schedule(Task, int, Action...)
Modifier and Type | Class and Description |
---|---|
static class |
ScheduleResult.Created |
static class |
ScheduleResult.Existing |
static class |
ScheduleResult.Refused |
Constructor and Description |
---|
ScheduleResult() |
Modifier and Type | Method and Description |
---|---|
static ScheduleResult.Created |
created(Queue.WaitingItem i) |
static ScheduleResult.Existing |
existing(Queue.Item i) |
Queue.WaitingItem |
getCreateItem()
If
isCreated() returns true, then this method returns
the newly created item, which is always of the type Queue.WaitingItem . |
Queue.Item |
getItem()
Unless
isRefused() is true, this method either returns
the newly created item in the queue or the existing item that's already
in the queue that matched the submitted task. |
boolean |
isAccepted()
Opposite of
isRefused() |
boolean |
isCreated()
If true, the
getItem() is newly created
as a result of Queue.schedule2(hudson.model.Queue.Task, int, java.util.List<hudson.model.Action>) . |
boolean |
isRefused()
The scheduling of the task was refused and the queue didn't change.
|
static ScheduleResult.Refused |
refused() |
public boolean isCreated()
getItem()
is newly created
as a result of Queue.schedule2(hudson.model.Queue.Task, int, java.util.List<hudson.model.Action>)
.public boolean isRefused()
getItem()
will return null.@CheckForNull public Queue.Item getItem()
isRefused()
is true, this method either returns
the newly created item in the queue or the existing item that's already
in the queue that matched the submitted task.@CheckForNull public Queue.WaitingItem getCreateItem()
isCreated()
returns true, then this method returns
the newly created item, which is always of the type Queue.WaitingItem
.public final boolean isAccepted()
isRefused()
public static ScheduleResult.Created created(Queue.WaitingItem i)
public static ScheduleResult.Existing existing(Queue.Item i)
public static ScheduleResult.Refused refused()
Copyright © 2004–2021. All rights reserved.