Class DockerDisabled

java.lang.Object
hudson.model.AbstractDescribableImpl<DockerDisabled>
com.nirima.jenkins.plugins.docker.DockerDisabled
All Implemented Interfaces:
Describable<DockerDisabled>, Serializable

public class DockerDisabled extends AbstractDescribableImpl<DockerDisabled> implements Serializable
Records that the user has disabled something "until further notice", or the system has disabled something for a period, or both.
See Also:
  • 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 cause isDisabled() 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 or disableBySystem(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

      public String getWhenDisabledBySystemString()
      Returns:
      How long ago this was disabled by the system, e.g. "3 min 0 sec".
    • getWhenReEnableBySystemString

      public String getWhenReEnableBySystemString()
      Returns:
      How long ago this will remain disabled by the system, e.g. "2 min 0 sec".
    • getReasonWhyDisabledBySystem

      public String getReasonWhyDisabledBySystem()
    • getExceptionWhenDisabledBySystemString

      public String getExceptionWhenDisabledBySystemString()
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • readTimeNowInNanoseconds

      @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) protected long readTimeNowInNanoseconds()