public abstract class AbstractStep extends java.lang.Object implements Step
Step logic.| Modifier and Type | Field and Description |
|---|---|
protected java.util.UUID |
id |
protected Logger |
logger
Non-static to ensure that we inherit the names of subclasses.
|
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractStep(java.lang.String name,
Status status) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o) |
void |
forceComplete()
Forcefully marks the element as
Status.COMPLETE, cancelling any work that hasn't started. |
java.util.UUID |
getId()
Returns the unique identifier of this Element.
|
java.lang.String |
getName()
Returns a user-visible name describing the purpose of this Element.
|
Status |
getStatus()
Returns the
Status of this Element, used to determine if the element still has work to be completed. |
int |
hashCode() |
void |
interrupt()
A call to interrupt indicates to an
Interruptible that it should not continue work beyond the current
point, until Interruptible.proceed() is called. |
boolean |
isInterrupted()
Indicates whether the object is interrupted or not.
|
void |
proceed()
A call to proceed indicates to an
Interruptible that it should may cancel a previous Interruptible.interrupt()
call and resume with any in-progress work. |
void |
restart()
Forcefully restarts the element by putting it into a
Status.PENDING state. |
protected void |
setStatus(Status newStatus)
Updates the status setting and logs the outcome.
|
java.lang.String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitgetDisplayStatus, getMessage, getPodInstanceRequirement, isAssetDirty, isEligible, start, updateOfferStatusgetErrors, hasErrors, isComplete, isPending, isPrepared, isRunning, isStarted, isStarting, update, updateParametersprotected final Logger logger
protected java.util.UUID id
protected AbstractStep(java.lang.String name,
Status status)
public java.util.UUID getId()
Elementpublic java.lang.String getName()
Elementpublic Status getStatus()
ElementStatus of this Element, used to determine if the element still has work to be completed.protected void setStatus(Status newStatus)
this, or by subclasses.newStatus - the new status to be setpublic void interrupt()
InterruptibleInterruptible that it should not continue work beyond the current
point, until Interruptible.proceed() is called. This call has no effect if the object is already interrupted.interrupt in interface Interruptiblepublic void proceed()
InterruptibleInterruptible that it should may cancel a previous Interruptible.interrupt()
call and resume with any in-progress work. This call has no effect if the object is already proceeding.proceed in interface Interruptiblepublic boolean isInterrupted()
InterruptibleisInterrupted in interface Interruptiblepublic void restart()
ElementStatus.PENDING state.public void forceComplete()
ElementStatus.COMPLETE, cancelling any work that hasn't started.forceComplete in interface Elementpublic java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object