Class RecurringMaintenanceWindow
- java.lang.Object
-
- hudson.model.AbstractDescribableImpl<RecurringMaintenanceWindow>
-
- com.sap.prd.jenkins.plugins.agent_maintenance.RecurringMaintenanceWindow
-
- All Implemented Interfaces:
Describable<RecurringMaintenanceWindow>
public class RecurringMaintenanceWindow extends AbstractDescribableImpl<RecurringMaintenanceWindow>
Defines a recurring maintenance window based on a cron like schedule.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
RecurringMaintenanceWindow.DescriptorImpl
Descriptor for UI only.
-
Field Summary
Fields Modifier and Type Field Description static int
CHECK_INTERVAL_MINUTES
static int
LEAD_TIME_DAYS
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
int
getDuration()
Set<MaintenanceWindow>
getFutureMaintenanceWindows()
Returns a list of maintenance windows that should be put into the scheduled maintenance windows of an agent.String
getId()
String
getMaxWaitMinutes()
long
getNextCheck()
String
getReason()
String
getStartTimeSpec()
String
getUserid()
int
hashCode()
boolean
isKeepUpWhenActive()
boolean
isTakeOnline()
protected Object
readResolve()
-
Methods inherited from class hudson.model.AbstractDescribableImpl
getDescriptor
-
-
-
-
Constructor Detail
-
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 Detail
-
readResolve
protected Object readResolve() throws ObjectStreamException
- Throws:
ObjectStreamException
-
getStartTimeSpec
public String getStartTimeSpec()
-
getDuration
public int getDuration()
-
getReason
public String getReason()
-
isTakeOnline
public boolean isTakeOnline()
-
isKeepUpWhenActive
public boolean isKeepUpWhenActive()
-
getMaxWaitMinutes
public String getMaxWaitMinutes()
-
getUserid
public String getUserid()
-
getNextCheck
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public long getNextCheck()
-
getId
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public String 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.
-
-