Package io.quarkus.devservices.common
Class ContainerShutdownCloseable
- java.lang.Object
-
- io.quarkus.devservices.common.ContainerShutdownCloseable
-
- All Implemented Interfaces:
Closeable,AutoCloseable
public final class ContainerShutdownCloseable extends Object implements Closeable
Helper to define the stop strategy for containers created by DevServices. In particular we don't want to actually stop the containers when they have been flagged for reuse, and when the Testcontainers configuration has been explicitly set to allow container reuse. To enable reuse, ass testcontainers.reuse.enable=true in your .testcontainers.properties file, to be stored in your home.- See Also:
- Testcontainers Configuration.
-
-
Constructor Summary
Constructors Constructor Description ContainerShutdownCloseable(org.testcontainers.containers.GenericContainer container, String friendlyServiceName)
-
-
-
Constructor Detail
-
ContainerShutdownCloseable
public ContainerShutdownCloseable(org.testcontainers.containers.GenericContainer container, String friendlyServiceName)- Parameters:
container- the container to be eventually closedfriendlyServiceName- for logging purposes
-
-
Method Detail
-
close
public void close()
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
-