Class AbstractOcpDatabaseController<C extends DatabaseClient<?,?>>
- java.lang.Object
-
- io.debezium.testing.system.tools.databases.AbstractOcpDatabaseController<C>
-
- All Implemented Interfaces:
DatabaseController<C>
- Direct Known Subclasses:
OcpMongoController,OcpSqlDatabaseController
public abstract class AbstractOcpDatabaseController<C extends DatabaseClient<?,?>> extends Object implements DatabaseController<C>
- Author:
- Jakub Cechacek
-
-
Field Summary
Fields Modifier and Type Field Description protected io.fabric8.kubernetes.api.model.apps.Deploymentdeploymentprivate static org.slf4j.LoggerLOGGERprotected Stringnameprotected io.fabric8.openshift.client.OpenShiftClientocpprotected OpenShiftUtilsocpUtilsprotected Stringprojectprotected List<io.fabric8.kubernetes.api.model.Service>services
-
Constructor Summary
Constructors Constructor Description AbstractOcpDatabaseController(io.fabric8.kubernetes.api.model.apps.Deployment deployment, List<io.fabric8.kubernetes.api.model.Service> services, io.fabric8.openshift.client.OpenShiftClient ocp)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidawaitIngress()StringgetDatabaseHostname()intgetDatabasePort()private io.fabric8.kubernetes.api.model.ServicegetLoadBalancedService()StringgetPublicDatabaseHostname()intgetPublicDatabasePort()private io.fabric8.kubernetes.api.model.ServicegetService()voidreload()Reloads the database to initial state-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.debezium.testing.system.tools.databases.DatabaseController
getDatabaseClient, getPublicDatabaseUrl, initialize
-
-
-
-
Field Detail
-
LOGGER
private static final org.slf4j.Logger LOGGER
-
ocp
protected final io.fabric8.openshift.client.OpenShiftClient ocp
-
project
protected final String project
-
ocpUtils
protected final OpenShiftUtils ocpUtils
-
deployment
protected io.fabric8.kubernetes.api.model.apps.Deployment deployment
-
name
protected String name
-
services
protected List<io.fabric8.kubernetes.api.model.Service> services
-
-
Constructor Detail
-
AbstractOcpDatabaseController
public AbstractOcpDatabaseController(io.fabric8.kubernetes.api.model.apps.Deployment deployment, List<io.fabric8.kubernetes.api.model.Service> services, io.fabric8.openshift.client.OpenShiftClient ocp)
-
-
Method Detail
-
getLoadBalancedService
private io.fabric8.kubernetes.api.model.Service getLoadBalancedService()
-
getService
private io.fabric8.kubernetes.api.model.Service getService()
-
awaitIngress
private void awaitIngress()
-
reload
public void reload() throws InterruptedExceptionDescription copied from interface:DatabaseControllerReloads the database to initial state- Specified by:
reloadin interfaceDatabaseController<C extends DatabaseClient<?,?>>- Throws:
InterruptedException- on timing issue
-
getDatabaseHostname
public String getDatabaseHostname()
- Specified by:
getDatabaseHostnamein interfaceDatabaseController<C extends DatabaseClient<?,?>>- Returns:
- available hostname of the database
-
getDatabasePort
public int getDatabasePort()
- Specified by:
getDatabasePortin interfaceDatabaseController<C extends DatabaseClient<?,?>>- Returns:
- available port of the database
-
getPublicDatabaseHostname
public String getPublicDatabaseHostname()
- Specified by:
getPublicDatabaseHostnamein interfaceDatabaseController<C extends DatabaseClient<?,?>>- Returns:
- publicly available hostname of the database
-
getPublicDatabasePort
public int getPublicDatabasePort()
- Specified by:
getPublicDatabasePortin interfaceDatabaseController<C extends DatabaseClient<?,?>>- Returns:
- publicly available port of the database
-
-