Class Database.MaintenanceSchedule
java.lang.Object
com.github.cowwoc.digitalocean.resource.Database.MaintenanceSchedule
-
Constructor Summary
ConstructorsConstructorDescriptionMaintenanceSchedule(DigitalOceanClient client, OffsetTime hour, DayOfWeek day, boolean pending, List<String> descriptions) Creates a new schedule. -
Method Summary
Modifier and TypeMethodDescriptionday()Returns the day of the week when maintenance may take place.booleanConverts this object to a type that is accepted byDatabaseCreator.Returns a list of strings, each containing information about a pending maintenance update.inthashCode()hour()Returns the start hour when maintenance may take place.booleanDetermines whether any maintenance is scheduled to be performed in the next maintenance window.toString()
-
Constructor Details
-
MaintenanceSchedule
public MaintenanceSchedule(DigitalOceanClient client, OffsetTime hour, DayOfWeek day, boolean pending, List<String> descriptions) Creates a new schedule.- Parameters:
client- the client configurationhour- the start hour when maintenance may take placeday- the day of the week when maintenance may take placepending- determines whether any maintenance is scheduled to be performed in the next maintenance windowdescriptions- a list of strings, each containing information about a pending maintenance update- Throws:
NullPointerException- if any of the arguments are nullIllegalArgumentException- if:- one of the
descriptionscontains leading or trailing whitespace or is empty. hourcontains a non-zero minute, second or nano component.
- one of the
-
-
Method Details
-
hour
-
day
Returns the day of the week when maintenance may take place.- Returns:
- the day
-
isPending
public boolean isPending()Determines whether any maintenance is scheduled to be performed in the next maintenance window.- Returns:
trueif maintenance is scheduled
-
getDescriptions
-
hashCode
-
equals
-
toString
-
forCreator
Converts this object to a type that is accepted byDatabaseCreator.- Returns:
- the
DatabaseCreator.MaintenanceSchedule
-