Class RecurringMaintenanceWindow
java.lang.Object
hudson.model.AbstractDescribableImpl<RecurringMaintenanceWindow>
com.sap.prd.jenkins.plugins.agent_maintenance.RecurringMaintenanceWindow
- All Implemented Interfaces:
Describable<RecurringMaintenanceWindow>
Defines a recurring maintenance window based on a cron like schedule.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Descriptor for UI only. -
Field Summary
-
Constructor Summary
-
Method Summary
Methods inherited from class hudson.model.AbstractDescribableImpl
getDescriptor
-
Field Details
-
CHECK_INTERVAL_MINUTES
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public static int CHECK_INTERVAL_MINUTES -
LEAD_TIME_DAYS
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public static int LEAD_TIME_DAYS
-
-
Constructor Details
-
RecurringMaintenanceWindow
@DataBoundConstructor public RecurringMaintenanceWindow(String startTimeSpec, String reason, boolean takeOnline, boolean keepUpWhenActive, String maxWaitMinutes, String duration, String userid, String id, long nextCheck) Creates a new recurring maintenance window.- Parameters:
startTimeSpec
- Start timereason
- ReasontakeOnline
- Take online at end of maintenancekeepUpWhenActive
- Keep up while builds are runningmaxWaitMinutes
- Max waiting time before canceling running builds.duration
- Duration of the maintenanceuserid
- Userid that created the maintenance windowid
- ID of the maintenance, usenull
to generate a new idnextCheck
- timestamp when the next check should be performed- Throws:
ANTLRException
- When parsing the crontab list fails
-
-
Method Details
-
readResolve
- Throws:
ObjectStreamException
-
getStartTimeSpec
-
getDuration
public int getDuration() -
getReason
-
isTakeOnline
public boolean isTakeOnline() -
isKeepUpWhenActive
public boolean isKeepUpWhenActive() -
getMaxWaitMinutes
-
getUserid
-
getNextCheck
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public long getNextCheck() -
getId
-
getFutureMaintenanceWindows
@NonNull @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public Set<MaintenanceWindow> getFutureMaintenanceWindows()Returns a list of maintenance windows that should be put into the scheduled maintenance windows of an agent. Updates the nextCheck interval for the recurring window.- Returns:
- The list of maintenance windows.
-
hashCode
public int hashCode() -
equals
-