Package io.ebean.test.containers
Interface Container<C extends Container<C>>
- All Known Implementing Classes:
ClickHouseContainer,CockroachContainer,Db2Container,ElasticContainer,HanaContainer,LocalDynamoDBContainer,Localstack2Container,LocalstackContainer,MariaDBContainer,MySqlContainer,NuoDBContainer,OracleContainer,PostgisContainer,PostgresContainer,RedisContainer,SqlServerContainer,YugabyteContainer
public interface Container<C extends Container<C>>
Commands for starting and stopping a DB container.
-
Method Summary
Modifier and TypeMethodDescriptionconfig()Returns the container configuration.booleanReturn true if the container is running.intport()Return the port this container is using.start()Start and return the container.booleanStart the container returning true if successful.voidStart the container or throw a IllegalStateException.voidstop()Stop the container.voidStop and remove the container .
-
Method Details
-
config
ContainerConfig config()Returns the container configuration. -
start
C start()Start and return the container.Throws an IllegalStateException if the container can not be started.
-
startOrThrow
void startOrThrow()Start the container or throw a IllegalStateException. -
startMaybe
boolean startMaybe()Start the container returning true if successful. -
stop
void stop()Stop the container. -
stopRemove
void stopRemove()Stop and remove the container . -
isRunning
boolean isRunning()Return true if the container is running. -
port
int port()Return the port this container is using.This is typically useful if the container was started with a random port and, we need to know what that port was.
-