Class DockerDisabled
java.lang.Object
hudson.model.AbstractDescribableImpl<DockerDisabled>
com.nirima.jenkins.plugins.docker.DockerDisabled
- All Implemented Interfaces:
Describable<DockerDisabled>
,Serializable
Records that the user has disabled something "until further notice", or the
system has disabled something for a period, or both.
- See Also:
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
disableBySystem
(String reasonGiven, long durationInMilliseconds, Throwable exception) Called from owning classes to record a problem that will causeisDisabled()
to return true for a period.boolean
boolean
boolean
boolean
int
hashCode()
boolean
Indicates if we are currently disabled for any reason (either the user has ticked the disable box ordisableBySystem(String, long, Throwable)
has been called recently).protected long
void
setDisabledByChoice
(boolean disabledByChoice) void
setEnabledByChoice
(boolean enabledByChoice) toString()
Methods inherited from class hudson.model.AbstractDescribableImpl
getDescriptor
-
Constructor Details
-
DockerDisabled
@DataBoundConstructor public DockerDisabled()
-
-
Method Details
-
setDisabledByChoice
@DataBoundSetter public void setDisabledByChoice(boolean disabledByChoice) -
getDisabledByChoice
public boolean getDisabledByChoice() -
disableBySystem
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public void disableBySystem(@NonNull String reasonGiven, long durationInMilliseconds, @Nullable Throwable exception) Called from owning classes to record a problem that will causeisDisabled()
to return true for a period.- Parameters:
reasonGiven
- Human-readable String stating why.durationInMilliseconds
- Length of time, in milliseconds, the disablement should continue.exception
- Optional exception.
-
isDisabled
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public boolean isDisabled()Indicates if we are currently disabled for any reason (either the user has ticked the disable box ordisableBySystem(String, long, Throwable)
has been called recently).- Returns:
- true if we are currently disabled.
-
setEnabledByChoice
@DataBoundSetter public void setEnabledByChoice(boolean enabledByChoice) -
getEnabledByChoice
public boolean getEnabledByChoice() -
getDisabledBySystem
public boolean getDisabledBySystem() -
getWhenDisabledBySystemString
- Returns:
- How long ago this was disabled by the system, e.g. "3 min 0 sec".
-
getWhenReEnableBySystemString
- Returns:
- How long ago this will remain disabled by the system, e.g. "2 min 0 sec".
-
getReasonWhyDisabledBySystem
-
getExceptionWhenDisabledBySystemString
-
equals
-
hashCode
public int hashCode() -
toString
-
readTimeNowInNanoseconds
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) protected long readTimeNowInNanoseconds()
-