Class MaintenanceOptions
java.lang.Object
io.vertx.ext.consul.MaintenanceOptions
Options used to placing a given service into "maintenance mode".
During maintenance mode, the service will be marked as unavailable
and will not be present in DNS or API queries. Maintenance mode is persistent
and will be automatically restored on agent restart.
- Author:
- Ruslan Sennov
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructorMaintenanceOptions(JsonObject options) Constructor from JSONMaintenanceOptions(MaintenanceOptions options) Copy constructor -
Method Summary
Modifier and TypeMethodDescriptiongetId()Get the ID of serviceGet the reason messagebooleanisEnable()Get maintenance modesetEnable(boolean enable) Set maintenance mode to enabled:trueto enter maintenance mode orfalseto resume normal operation.Set the ID of service.Set the reason message.toJson()Convert to JSON
-
Constructor Details
-
MaintenanceOptions
public MaintenanceOptions()Default constructor -
MaintenanceOptions
Copy constructor- Parameters:
options- the one to copy
-
MaintenanceOptions
-
-
Method Details
-
toJson
-
setId
Set the ID of service. This field is required.- Parameters:
id- the ID of service- Returns:
- reference to this, for fluency
-
getId
-
setEnable
Set maintenance mode to enabled:trueto enter maintenance mode orfalseto resume normal operation. This flag is required.- Parameters:
enable- maintenance mode- Returns:
- reference to this, for fluency
-
isEnable
public boolean isEnable()Get maintenance mode- Returns:
- the boolean if maintenance mode enabled
-
setReason
Set the reason message. If provided, its value should be a text string explaining the reason for placing the service into maintenance mode. This is simply to aid human operators.- Parameters:
reason- the reason message- Returns:
- reference to this, for fluency
-
getReason
-