Package hudson.slaves

Class SimpleScheduledRetentionStrategy

    • Constructor Detail

      • SimpleScheduledRetentionStrategy

        @DataBoundConstructor
        public SimpleScheduledRetentionStrategy​(String startTimeSpec,
                                                int upTimeMins,
                                                boolean keepUpWhenActive)
        Parameters:
        startTimeSpec - the crontab entry to be parsed
        Throws:
        IllegalArgumentException - if the crontab entry cannot be parsed
    • Method Detail

      • getUpTimeMins

        public int getUpTimeMins()
      • isKeepUpWhenActive

        public boolean isKeepUpWhenActive()
      • getStartTimeSpec

        public String getStartTimeSpec()
      • isManualLaunchAllowed

        public boolean isManualLaunchAllowed​(SlaveComputer c)
        Description copied from class: RetentionStrategy
        This method is called to determine whether manual launching of the agent is allowed right now.
        Overrides:
        isManualLaunchAllowed in class RetentionStrategy<SlaveComputer>
        Parameters:
        c - Computer for which this strategy is assigned. This computer may be online or offline. This object also exposes a bunch of properties that the callee can use to decide if manual launching is allowed.
        Returns:
        true if manual launching of the agent is allowed right now.
      • check

        public long check​(SlaveComputer c)
        Description copied from class: RetentionStrategy
        This method will be called periodically to allow this strategy to decide what to do with its owning agent.
        Specified by:
        check in class RetentionStrategy<SlaveComputer>
        Parameters:
        c - Computer for which this strategy is assigned. This computer may be online or offline. This object also exposes a bunch of properties that the callee can use to decide what action to take.
        Returns:
        The number of minutes after which the strategy would like to be checked again. The strategy may be rechecked earlier or later than this!