public static final class InitServiceOptions.Builder
extends java.lang.Object
InitServiceOptions
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
InitServiceOptions |
build()
Builds the configured instance.
|
InitServiceOptions.Builder |
enabled(java.lang.Boolean enabled)
Sets the value of
InitServiceOptions.getEnabled() |
InitServiceOptions.Builder |
ensureRunning(java.lang.Boolean ensureRunning)
Sets the value of
InitServiceOptions.getEnsureRunning() |
InitServiceOptions.Builder |
serviceRestartHandle(InitServiceRestartHandle serviceRestartHandle)
Sets the value of
InitServiceOptions.getServiceRestartHandle() |
public InitServiceOptions.Builder enabled(java.lang.Boolean enabled)
InitServiceOptions.getEnabled()
enabled
- Enable or disable this service.
Set to true to ensure that the service will be started automatically upon boot.
Set to false to ensure that the service will not be started automatically upon boot.
this
public InitServiceOptions.Builder ensureRunning(java.lang.Boolean ensureRunning)
InitServiceOptions.getEnsureRunning()
ensureRunning
- Make sure this service is running or not running after cfn-init finishes.
Set to true to ensure that the service is running after cfn-init finishes.
Set to false to ensure that the service is not running after cfn-init finishes.
this
public InitServiceOptions.Builder serviceRestartHandle(InitServiceRestartHandle serviceRestartHandle)
InitServiceOptions.getServiceRestartHandle()
serviceRestartHandle
- Restart service when the actions registered into the restartHandle have been performed.
Register actions into the restartHandle by passing it to InitFile
, InitCommand
,
InitPackage
and InitSource
objects.this
public InitServiceOptions build()
InitServiceOptions
java.lang.NullPointerException
- if any required attribute was not provided