Package org.jenkinsci.plugins.cloudstats
Class ProvisioningActivity
java.lang.Object
org.jenkinsci.plugins.cloudstats.ProvisioningActivity
- All Implemented Interfaces:
ModelObject
,Comparable<ProvisioningActivity>
public final class ProvisioningActivity
extends Object
implements ModelObject, Comparable<ProvisioningActivity>
Record of provisioning attempt lifecycle.
- Author:
- ogondza.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
Activity identifier.static enum
Progress of an activity.static enum
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
void
enter
(ProvisioningActivity.Phase phase) Make the phase of this activity entered.boolean
Make sure the phase of this activity is entered.boolean
Get currentProvisioningActivity.Phase
.Get currentPhaseExecution
.long
getDuration
(PhaseExecution execution) Get duration of the activity phase.getId()
getName()
PhaseExecution
or null in case it is/was not executed.Get sorted mapping of all phase executions.long
Status of the activity as a whole.int
hashCode()
boolean
toString()
-
Field Details
-
PREMATURE_COMPLETION_DETECTED
- See Also:
-
-
Constructor Details
-
ProvisioningActivity
-
-
Method Details
-
getId
-
getStarted
-
getStartedTimestamp
public long getStartedTimestamp() -
getPhaseExecution
PhaseExecution
or null in case it is/was not executed. -
getPhaseExecutions
Get sorted mapping of all phase executions.- Returns:
- Map of
ProvisioningActivity.Phase
and nullablePhaseExecution
.
-
getCurrentPhaseExecution
Get currentPhaseExecution
. -
getCurrentPhase
Get currentProvisioningActivity.Phase
. -
getStatus
Status of the activity as a whole.It is the works status of any of the phases, OK by default.
-
enter
Make the phase of this activity entered.- Throws:
IllegalArgumentException
- In case phases are entered repeatedly.
-
enterIfNotAlready
Make sure the phase of this activity is entered.Exposed for convenience of clients that can be invoked repeatedly and have no easier way to tell if phase was entered already, such as launch listener.
- Returns:
true
is phase was entered.
-
getName
-
getDisplayName
- Specified by:
getDisplayName
in interfaceModelObject
-
getPhase
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public PhaseExecution getPhase(@NonNull String phaseName) -
getDuration
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public long getDuration(@NonNull PhaseExecution execution) Get duration of the activity phase.- Returns:
- Positive integer in case the phase is completed, negative in case it is in progress
-
isFor
-
compareTo
- Specified by:
compareTo
in interfaceComparable<ProvisioningActivity>
-
toString
-
equals
-
hashCode
public int hashCode()
-