Class DockerDisabled

    • Constructor Detail

      • DockerDisabled

        @DataBoundConstructor
        public DockerDisabled()
    • Method Detail

      • 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()
      • hashCode

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

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