public interface Element
Plan
s, @{link Phase}s and Step
s are all implementations of Elements. Elements
have Strategies (see: Strategy
associated with them which describe when child elements should be presented as
candidates for execution.Modifier and Type | Method and Description |
---|---|
void |
forceComplete()
Forcefully marks the element as
Status.COMPLETE , cancelling any work that hasn't started. |
java.util.List<java.lang.String> |
getErrors()
Returns a list of user-visible descriptive error messages associated with this Element.
|
java.util.UUID |
getId()
Returns the unique identifier of this Element.
|
default java.lang.String |
getMessage()
Returns a reasonable user-visible status message.
|
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. |
default boolean |
hasErrors()
Indicates whether this Element has encountered errors.
|
default boolean |
isComplete()
Indicates whether this Element is complete.
|
default boolean |
isEligible(java.util.Collection<PodInstanceRequirement> dirtyAssets)
Indicates whether this Element is capable of being started.
|
default boolean |
isPending()
Indicates whether this Element has been started.
|
default boolean |
isPrepared()
Indicates whether this Element is prepared.
|
default boolean |
isRunning()
Indicates whether this Element is prepared, starting, or in progress.
|
default boolean |
isStarted()
Indicates whether the Element is starting.
|
default boolean |
isStarting()
Indicates whether the Element is starting.
|
void |
restart()
Forcefully restarts the element by putting it into a
Status.PENDING state. |
void |
update(TaskStatus status)
Provides the Element with a recent
TaskStatus update which was received from Mesos. |
default void |
updateParameters(java.util.Map<java.lang.String,java.lang.String> parameters)
Provides the Element with a set of named string parameters that it can either use on start or provide to
children, if it has any.
|
java.util.UUID getId()
java.lang.String getName()
Status getStatus()
Status
of this Element, used to determine if the element still has work to be completed.void update(TaskStatus status)
TaskStatus
update which was received from Mesos.void restart()
Status.PENDING
state.void forceComplete()
Status.COMPLETE
, cancelling any work that hasn't started.java.util.List<java.lang.String> getErrors()
default boolean hasErrors()
default boolean isPending()
default boolean isPrepared()
default boolean isStarting()
default boolean isStarted()
default boolean isComplete()
default boolean isRunning()
default boolean isEligible(java.util.Collection<PodInstanceRequirement> dirtyAssets)
default void updateParameters(java.util.Map<java.lang.String,java.lang.String> parameters)
default java.lang.String getMessage()