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 classActivity identifier.static enumProgress of an activity.static enum -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintvoidenter(ProvisioningActivity.Phase phase) Make the phase of this activity entered.booleanMake sure the phase of this activity is entered.booleanGet currentProvisioningActivity.Phase.Get currentPhaseExecution.longgetDuration(PhaseExecution execution) Get duration of the activity phase.getId()getName()PhaseExecutionor null in case it is/was not executed.Get sorted mapping of all phase executions.longStatus of the activity as a whole.inthashCode()booleantoString()
-
Field Details
-
PREMATURE_COMPLETION_DETECTED
- See Also:
-
-
Constructor Details
-
ProvisioningActivity
-
-
Method Details
-
getId
-
getStarted
-
getStartedTimestamp
public long getStartedTimestamp() -
getPhaseExecution
PhaseExecutionor null in case it is/was not executed. -
getPhaseExecutions
Get sorted mapping of all phase executions.- Returns:
- Map of
ProvisioningActivity.Phaseand 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:
trueis phase was entered.
-
getName
-
getDisplayName
- Specified by:
getDisplayNamein 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:
compareToin interfaceComparable<ProvisioningActivity>
-
toString
-
equals
-
hashCode
public int hashCode()
-