Class ComposeServiceContainer
java.lang.Object
io.spring.initializr.generator.container.docker.compose.ComposeServiceContainer
A container for Docker Compose services.
- Author:
- Stephane Nicoll
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(String name, Consumer<ComposeService.Builder> service) Add aComposeServicewith the specified name andConsumerto customize the object.booleanSpecify if this container has a service customization with the specifiedname.booleanisEmpty()Specify if this container is empty.booleanRemove the service with the specifiedname.values()Return theservicesto customize.
-
Constructor Details
-
ComposeServiceContainer
public ComposeServiceContainer()
-
-
Method Details
-
isEmpty
public boolean isEmpty()Specify if this container is empty.- Returns:
trueif no service is registered
-
has
Specify if this container has a service customization with the specifiedname.- Parameters:
name- the name of a service- Returns:
trueif a customization for a service with the specifiednameexists
-
values
Return theservicesto customize.- Returns:
- the compose services
-
add
Add aComposeServicewith the specified name andConsumerto customize the object. If the service has already been added, the consumer can be used to further tune the existing service configuration.- Parameters:
name- the name of the serviceservice- aConsumerto customize theComposeService
-
remove
Remove the service with the specifiedname.- Parameters:
name- the name of the service- Returns:
trueif such a service was registered,falseotherwise
-